"Not a Valid Bookmark" error with no vba code

G

Guest

Hello: I am getting this error when my Access database is open--this has a
few linked tables, but I haven't added any other code. Any ideas?

Not a valid bookmark. (Error 3159)
You tried to set a bookmark to an invalid string.

This error can occur if you set the Bookmark property to a string that is
invalid or was not saved from previously reading a Bookmark property. For
example, the following code produces this error:

Sub SetBookmark()

Dim dbs As Database

Dim rstEmployees As Recordset

Dim strPlaceholder As String


Set dbs = OpenDatabase("Northwind.mdb")

Set rstEmployees = _

dbs.OpenRecordset _

("Employees", dbOpenDynaset)

strPlaceholder = "1"

rstEmployees.Bookmark = strPlaceholder ' Not a valid bookmark.

End Sub
 
A

Allen Browne

The bookmark is not the AbsolutePosition of the recordset.

If you wanted to mark the first record, you would use:
strPlaceHolder = rst.Bookmark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RecordSets? 6
not a valid bookmark 2
VB Runtime error 3159 5
Help with code 5
Not a Valid Bookmark error 4
Not a valid bookmark. (Error 3159) 2
Error with RecordSet Coding 5
Not a valid bookmark 1

Top