ADO » Recordset » Bookmark

variant = recordsetobject.Bookmark
recordsetobject.Bookmark = variant

Sets or returns a variant value that uniquely defines the position of a record in a recordset.

The Bookmark property sets or returns a variant that uniquely marks the current record. This allows you to quickly return to that record, even after you have visited numerous other records in the same Recordset. Note that the actual value of the bookmark is not important and, even if you try, you may not be able to view the value.

If you have created a copy of a Recordset using the Clone method, both the original and the clone will have the same bookmark.

Unfortunately, not all providers support the Bookmark property. In this regard, support is cursor dependent. For example, server-side dynamic cursors do not support bookmarks, while client-side and static cursor usually do provide support.


varBookMark = rsChantList.Bookmark
rsChantList.Find "ChantName = 'Oma' "
If (objRecordset.EOF = True) Then
   MsgBox "Record not found", vbOK
   rsChantList.Bookmark = varBookMark
End If

See Also: