I need to save the exact location of a record wen I finish reading the resordset, and thhen using that record later to start reding the Recordset on that location.
Note: Someting like the bookmark command on Access.
Dim varMyBookmark 'create a variant to hold the bookmark
(open the recordset)
varMyBookmark = rs.Bookmark 'set the bookmark at the current record
(some processing of records)
rs.Bookmark = varMyBookmark 'move the cursor back to the bookmark
Some recordsets don't support bookmarks - to check that yours does, use rs.Supports(adBookmark) - returns a boolean value.
Use can also use ADO Bookmarks to move through a recordset, ie:
rs.Move 3, adBookmarkCurrent 'moves 3 records from current
rs.Move 3, adBookmarkFirst 'moves to fourth record
rs.Move -1,adBookmarkLast 'moves to second-last record.
adBookmarkCurrent, adBookmarkFirst and adBookmarkLast are predefined in msado15.dll.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.