<-- Previous || Up || Next -->

Bookmark To String Function
String Extras Class

Public Function BookmarkToString( _
    ByVal vBookmark As Variant _
    ) As Variant

"Bookmark To String" or "String From Bookmark"
Converts the DAO "Bookmark" Property to a printable 8-character-long string value.
"Bookmark" is a Recordset Property within the Data Access Objects (DAO) that acts as the placeholder for a specific record.
This is the inverse of the BookmarkFromString function.

Examples:
    BookmarkToString(Chr$(1) + Chr$(2) + Chr$(3) + Chr$(4)) = "01020304"
    BookmarkToString(Chr$(1) + Chr$(2) + Chr$(3) + Chr$(192)) = "010203C0"
Example:
    Assuming
       Dim wsCur As Workspace
       Set wsCur = CreateWorkspace("Main", "Admin")
       Dim dbCur As Database
       Set dbCur = wsCur.OpenDatabase("C:\TEMP\SOMEDB.MDB")
       Dim rsCur As Recordset
       Set rsCur = dbCur.OpenRecordset("MSysObjects")
       rsCur.MoveNext
       Dim strBookmark As String
    for example
       strBookmark = BookmarkToString(rsCur.Bookmark)
    leaves
       rsCur.Bookmark = BookmarkFromString(strBookmark)
See also:
    BookmarkFromString Function
    BookmarkToLong Function
vBookmark: String which represents the value of the "Bookmark" property for some DAO Recordset. Function returns Null if vBookmark is Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.