Table of Content
    Access Database Repair

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


    Table of Content

      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 database cannot be opened because the VBA project contained in it cannot be read error message

      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:

      • Corrupted database file
      • Incorrect Windows Registry settings
      • Opening the higher version (ACCDE) files in a lower Access version.
      • Problem with the latest updates of Microsoft Office

      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.

      • Open your Microsoft Access.
      • Go to Create > Visual Basic
      • In the Microsoft Visual Basic for Applications window, click Debug > Compile Database.
      Compile Database option under the Debug tab

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

      Here are the steps to decompile the database:

      • Open Command Prompt.
      • Type “C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE” /decompile “C:\FullPath\MyDatabase.ACCDB”
      • Press Enter.

      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:

      • Close all instances of Microsoft Access.
      • Open the File Explorer window. 
      • Click the View ribbon and then click the File name Extensions checkbox in the show/hide group.
      Check file name extensions option in File Explorer
      • Go to :\Program Files\Microsoft Office\Office14\ACCWIZ\.
      • Find the below files and rename them to (<filename>.old extension)

         Original File Name         Rename To

         Acwzmain.accde            Acwzmain.old

        Acwzlib.accde                 Acwzlib.old

        Acwztool.accde              Acwztool.old

        Utility.accda                    Utility.old

      • Start Microsoft Access.

      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:

      • Open Microsoft Access. 
      • Go to File > Info > Compact & Repair Database.
      Compact and Repair Database Option in Info Tab

      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. 

      Was this article helpful?

      No NO

      About The Author

      Monika Dadool linkdin

      Monika Dadool is a Senior Content Writer at Stellar with over 5 years of experience in technical writing. She is a tech enthusiast and expert who specializes in writing about SQL Server, MySQL Server, MariaDB Server, Microsoft Access, Active Directory, email recovery, Microsoft 365, pattern recognition, machine learning, data recovery, file repair, and operating systems like Linux, Windows, and Mac. She also writes about accounting software such as QuickBooks and Sage 50, as well as web-scripting languages like HTML, JavaScript, Python, PHP, Visual Basic, ASP.NET, and AJAX. Monika is passionate about researching and exploring new technologies, and she enjoys developing engaging technical blogs that help organizations and database administrators resolve various issues. When she's not creating content, you can find her on social media, watching web series, reading books, or exploring new food recipes.

      Leave a comment

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

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received