Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 61,178 times

Contents

Related Categories

Data Control - Using Bookmarks

Using Bookmarks

You can use bookmarks to save the position of a certain record, so that you can return to it at another time. To save a position, all you need to do is go to the position you want to save save the value of Data1.Recordset.Bookmark to a Variant variable. Then to return to that position,  set the Data1.Recordset.Bookmark property to the contents of the variable:

Dim varBookmark As Variant '// bookmark variable
varBookmark = datTitles.Recordset.Bookmark '// save the position
datTitles.Recordset.FindFirst "ISBN = '0-0131985-2-12'"
If datTitles.Recordset.NoMatch = True Then
    '// we will have been brought to the first record. Go back to the record we were at
    datTitles.Recordset.Bookmark = varBookmark
    MsgBox "No match found"
End If

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: [71] Data Control

    Posted by Bhaskerit on 28 Jun 2007

    Hi ! All,


    I'm new in VB Programming and trying with all your given examples. I'm trying to create a database project. I've created a table in Access 2000 and wants to attatch it with my VB ...

  • hi

    Posted by Regie on 28 Jul 2005

    im a newbie in vb, im working now with the examples above, my objective is to save,add, delete files to the database i can't do it. there is a propmted error invalid or unqualified references.

  • hi there

    Posted by Regie on 28 Jul 2005

    i am a newbie in vb,and now im currently working with the tutorials that are post above, my objective is that i want to save, add or delete a file to my stand-alone database. thanks for fast replies.

  • Posted by chandrababu on 28 Jul 2005

    At least give some explanation about the environment or
    what is you objective.

  • Error

    Posted by Regie on 28 Jul 2005

    hi there, why is that i can't add or save new file? the error propmt is
    "invalid or unqualified reference." plz send me an answer or email it to me plz..hoping to hear from you. ASAP..thanks