How to Resolve “The Database Cannot Be Opened Because The VBA Project Contained In It Cannot Be Read” Error in Access

Find out what the error “The Database Cannot Be Opened Because The VBA Project Contained In It Cannot Be Read” means and precautions you could take to prevent it.

The Database Cannot Be Opened Because The VBA Project Contained In It Cannot Be Read

It feels very frustrating for a data collection that previously worked perfectly to suddenly stop and begin showing error messages like the one shown above. Most people get confused and for a good reason since the error suggests that there is a VBA project within your database, which is not true. Let us explore the cause of this error and what you can do when you face it.

What causes this error?

The cause of this error can vary depending on your version of MS Access. For instance, if yours is Access 2010, the message could be triggered by an incompatible MDE/ACCDE/ADE file.

You could also encounter this problem when using other versions of MS Access. Essentially, the application prompts you to repair the database but will only return a message indicating the system has encountered corruption in the file. This problem is related to the VBA source code and cannot be fixed using the normal repair utility in Access.

Precautions you can take against this error

Although you may not get a foolproof plan to protect against this error, there are steps you can take to minimize the impact of this error. For starters, it is a good practice to always back up your database, preferably on a different computer or external drive. Make sure that you keep good backups in a secure place.

Also, take extra caution when updating files that support the proper running of MS Access, such as the JET engine. This is important, especially if you are running a split database where several users access it from different computers. If these computers are running on different versions of the JET engine software, fatal errors can occur on your database.

What to do when faced with this error

The problem with this error is that you cannot use the repair utility in Access to fix it. This is because the Access repair feature is built to fix issues associated with database tables. Your best shot is to restore the last working version of your database from your backups. But what happens when you do not have a backup or if it’s damaged? Try the following approaches to recover your Access database.

1.      Decompile and compile the database

Decompiling your database removes the previous compilation. What remains is the original source code. This removes any inconsistencies that could have been responsible for the damaged file. When you compile the database afresh, a new compiled state is achieved. If all works well, your database will be up and running.

To achieve this, run the “decompile” command on MSACCESS.EXE using the “Run” command line. You will need to include the file path of the Access executable file. Now, open any module of the target database, compile, and then save it. Compact and repair your data file. If this works well, you should get the error fixed. However, if the faults still persist, try the method explained below.

2.      Use third-party software to recover your database

Applications such as DataNumen Access Repair come in handy when other database recovery methods fail. Use this application to recover your MDB or ACCDB file, then create a blank database. Now, import the recovered data to the new database. This should fix the problem.

DataNumen Access Repair

Leave a Reply

Your email address will not be published. Required fields are marked *