[Fixed]: “Access Database cannot be Opened because the VBA Project Contained in it cannot be Read” Error

Summary: You may encounter the “Access database cannot be opened because the VBA project contained in it cannot be read” error in Microsoft Access due to different reasons. This blog discusses the reasons behind the error and the solutions to fix it. It also mentions an Access database repair software that can help fix the error if it has occurred due to corrupt database files.

When opening an Access database file in a different Access version or on a different system, you may encounter the “Access database cannot be opened because the VBA project contained in it cannot be read.”

The complete error message reads as follows:

“The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms, and reports. You should back up your database before attempting to open the database and delete the VBA project.”

The cause of the error may vary depending on the Access version. Below we’ll be discussing the causes that may lead to this error and the possible solutions to resolve it.

Causes of “Access Database cannot be Opened because the VBA Project Contained in it cannot be Read” Error

Some possible reasons for this error are:

Methods to Fix Access Database cannot be Opened Error

Following are some methods you can try to fix the Access database cannot be opened error:

Method 1: Compile the Database

You can compile the database to fix the VBA-related errors. Microsoft Access does not always compile every part of your database whenever you use it. It compiles what it requires and sometimes, pieces of that can get corrupted.

To compile your database, follow these steps:

Note: Take a backup of your database before proceeding.

After compiling, if you still get the error, you can try decompiling the database.

Here are the steps to decompile the database:

Method 2: Recreate Database Files

Some users have reported encountering this error when opening the ACCDE/MDE files (of Access 2010 SP1 version) with 64-bit versions of MS Access (initial release or RTM). They’re able to fix the error by recreating the database files from their source databases.

Method 3-Change File Name Extensions

Sometimes the “Access database cannot be opened because the VBA project contained in it cannot be read” error can occur due to outdated built-in wizard files. You can fix the error by changing the file name extensions using the below steps:

   Original File Name         Rename To

   Acwzmain.accde            Acwzmain.old

  Acwzlib.accde                 Acwzlib.old

  Acwztool.accde              Acwztool.old

  Utility.accda                    Utility.old

Method 4: Repair the Database

You may also encounter the “Access database cannot be opened” error if the database file is corrupt. You can repair the Access database using the Compact and Repair utility in MS Access. Here are the steps:

If the Compact and Repair utility fails to repair the corrupted database, then you can try an advanced Access repair software, such as Stellar Repair for Access. It is a reliable tool that can help fix the errors that occur due to corrupt database files. It can repair both ACCDB and MDB files. Moreover, it can recover all the components from the damaged database with 100% integrity. 

Conclusion

The error “Access database cannot be opened because the VBA project contained in it cannot be read” may occur due to several reasons. In this blog, we’ve outlined the common reasons behind the Access database error. Also, we’ve mentioned the possible methods to fix the error. If the database is corrupt, you can use the Compact and Repair utility in MS Access. If it doesn’t work, use a professional Access repair software, such as Stellar Repair for Access. This tool can easily repair severely corrupted MDD/ACCDB files and recover all the data. 

Related Post

Exit mobile version