--- title: "Using Bookmarks | Microsoft Docs" ms.prod: sql ms.prod_service: connectivity ms.technology: connectivity ms.custom: "" ms.date: "01/19/2017" ms.reviewer: "" ms.topic: conceptual helpviewer_keywords: - "bookmarks [ADO]" - "Recordset object [ADO]" ms.assetid: cca244e6-84f8-4394-bca9-f7a819b8f4df author: MightyPen ms.author: genemi --- # Using Bookmarks It is often useful to return directly to a specific record after having moved around in the **Recordset** without having to scroll through every record and compare values. For example, if you attempt to search for a record using the **Find** method but the search returns no records, you are automatically placed at either end of the **Recordset**. If your provider supports them, bookmarks can be used to mark your place before using the **Find** method so you can return to your location. A bookmark is a **Variant** type value that uniquely identifies a record in a **Recordset** object. You can also use a variant array of bookmarks with the **Recordset Filter** method to filter on a selected set of records. For details about this technique, see Filtering the Results in the topic, [Working with Recordsets](../../../ado/guide/data/working-with-recordsets.md), later in this section. You can use the **Bookmark** property to get a bookmark for a record, or set the current record in a **Recordset** object to the record identified by a valid bookmark. The following code uses the **Bookmark** property to set a bookmark and then return to the bookmarked record after moving on to other records. To determine if your **Recordset** supports bookmarks, use the **Supports** method. ``` 'BeginBookmarkEg Dim varBookmark As Variant Dim blnCanBkmrk As Boolean objRs.Open strSQL, strConnStr, adOpenStatic, adLockOptimistic, adCmdText If objRs.RecordCount > 4 Then objRs.Move 4 ' move to the fifth record blnCanBkmrk = objRs.Supports(adBookmark) If blnCanBkmrk = True Then varBookmark = objRs.Bookmark ' record the bookmark objRs.MoveLast ' move to a different record objRs.Bookmark = varBookmark ' return to the bookmarked (sixth) record End If End If 'EndBookmarkEg ``` The [Supports](../../../ado/reference/ado-api/supports-method.md) method is covered in more detail later. Except for the case of cloned **Recordsets**, bookmarks are unique to the **Recordset** in which they were created, even if the same command is used. This means that you cannot use a **Bookmark** obtained from one **Recordset** to move to the same record in a second **Recordset** opened with the same command.