Is your Access Database showing error regarding “Not a Valid Bookmark” error each time you tries to access the database using query?
Wants to know what fixes are there to resolve this particular Access error code 3159?
Well for that you need to go through this post. So, let’s get started…!
just like you many users are there who all rendering the same error code in their respective MS Access application i.e Access 2007/ 2010/2013/2016. So, have a look at the practical scenario.
When I try to open this Access database I receive an error message, “Not a Valid Bookmark” and the database stops opening. I have tried Compact and Repair and get the same error message. I created a new db and tried to import from the corrupt db and got the same message and no import. I tried accessing the db using Excel and MS Query and got the same message.
I restored the previous days backup so we’re back in business, but now I’m just curious. Is there a way to recover the data and any guess what happened?
About Access Error 3159 : Not A Valid Bookmark
When working with MS Access VBA, recordset bookmark property gets set with invalid string because of which not valid bookmark (error 3159) occur.
Recordset object based completely on the Microsoft Access database engine tables. The value of Bookmarkable property is true and you can use the bookmark property with that Recordset. Recordset bookmark property sets or returns bookmarks that uniquely identify the current record in Recordset object. Access runtime error 3159 – not a valid bookmark usually occurs when working with recordsets.
Error Name :
Not a valid bookmark
Error Number: 3159
Here is the screenshot of the error:
Symptoms Of Not Valid Bookmark (Error 3159):
Here are few symptoms when this specific MS Access Not a valid bookmark error is get prompted to your computer screen.
- The error also encountered when user bookmark a string that was not saved from previously reading Bookmark Property.
- While using MS Access to open a corrupted access database file
- When user uses the bookmark property of recordset objects to bookmark invalid string, then also this particular error will get prompted.
This error code 3159 also gets encountered when some data records in your Access Database are damaged. Or there is some corruption issue encountered in the database relationships.
Resolution To Fix Access Not A Valid Bookmark Error
Solution 1: Reproduce The Error
To reproduce the Access Not A Valid Bookmark Error users need to create table, so that in VBA they can be able to create recordset. After clicking the form button an error 3159 will generated.
Code to reproduce the error:
Option Compare Database
Private Sub Command0_Click()
Dim rst As Recordset
Dim str As String
‘Error 3159 Not a valid bookmark.
Set rst = CurrentDb.OpenRecordset(“Table1”, dbOpenDynaset)
str = rst(0)
rst.Bookmark = str
To fix this up you need to save the string after reading a bookmark property. So, that for the next time it is available. Use the valid string to accomplish the task.
Solution 2: Restoring the Old Database to New Database
Sometime the reason for the corruption of access files relationships or records are also the excessive file storage in access database. At that time it’s compulsory for the users to create a new file and export the data from the corrupted databases. If you don’t know how to perform this task then just follow down theses steps:
- First of all start MS Access and select the blank database present in MS Access and opt for OK button.
- Assign name to the new database and select a file location and use the Create option.
- Tap to the file menu and then move to the external data and opt for Import
- Tap to the file menu and switch to external data and opt for import.
- Browse and select the corrupted database and tap to the import option.
- If users don’t gets the object Window showing Import then the process can’t be recovered to the Access Database.
- Make selection for the Select on Tables present on top of the Import objects Windows, and opt for select all.
- Repeat for the tab present on the screen and hit on OK button in case the process gets over.
Solution 3: Compact and Repair In-built Utility
Before using the compact the repair built in tool, user should take these things in mind.
- Always make a backup of the files.
- Compact and Repair the databases automatically.
- Note down the System recovery error table.
- Get the access to database to make use of Compact and Repair database command.
- Get the sufficient permission to run compact and repair function.
The inbuilt utility tool works in two ways:
- When Database are opened by the user:
- Click on File tab ⇒ Opt for Info ⇒ Select Compact and Repair Database Option
Note: in this case, the other users are using the database file, and then this function can’t be performed.
- The database not opened by any user
- Firstly, Start MS Access but do not try to open the database files in it
- Point towards info ⇒ Click Compact and Repair Database
- In the dialog box of database to compact form, navigate and double click on the databases to be repaired.
Solution 4: Access Repair And Recovery Tool
To resolve this particular Access Query Error Not A Valid Bookmark you must try out the professional tool i.e Access Repair And Recovery tool. As, this tool is specifically designed to deal with the MS Access database corruption issues. Moreover the software effectively recovers inaccessible MDB and ACCDB files accurately from corrupt or damaged MS Access databases.
The notable highlight features of Access Repair And Recovery software are:
- Makes easy recovery of MDB or ACCDB files from any kind of corrupt databases
- Retrieves complete table structure and most important of all internal data structures such as primary keys, auto-number and field sizes accurately
- Easily retrieves table relationships, OLE data, Memo data etc.
- Before starting up the recovery process you can see the preview of your recoverable data.
- Also supports data recovery from a password protected Access database accdb/mdb files.
- Support recovery from entire MS Access database 95/97/2000/XP/2003/2007/2010/2013/2016/2019 version.
In this complete post we have listed down the every possible solution to resolve this particular Not A Valid Bookmark Access database Error. So, try the manual fixes if you are sure that you can perform it correctly or else it is recommended to go with the automatic solution i.e Access Repair And Recovery.
And don’t forget to share your opinion with us in our comment section.