Fix Microsoft Access Database Error: VBA Project Cannot Be Read
Question details
Recover an Access database and its VBA modules after an error prevents the VBA project from being read.

- Product
- Microsoft Access 2007–2013
- Device & OS
- not provided
- Scenario
- An Access 2007–2010 database is opened in Access 2010, but clean copies can be opened in Access 2013.
- Observed behavior
- The database becomes corrupted or loses VBA modules after being opened in Access 2010. Compact and Repair, decompilation, and service-pack installation have not resolved the issue.
Stop opening the only working copy in Access 2010 if that installation causes corruption. Verify that you have a clean copy that opens and test recovery on separate copies using a supported, fully updated Access installation.
Import Objects from a Clean Copy into a New Access Database
Use a clean copy to rebuild the database when the existing file's VBA project cannot be read.
Importing objects can recover accessible database components, but it cannot restore VBA code that is already missing or unreadable in the source copy.
In a supported, fully updated version of Access, select File > New > Blank database, choose a new file name, and select Create.
In the new database, open External Data and choose the Access database import option. Browse to a verified clean copy and select the option to import objects into the current database.
In the Import Objects dialog, select the needed tables, queries, forms, reports, macros, and modules on their respective tabs, then select OK.
Open the imported forms and reports, run representative queries, and use Database Tools > Visual Basic to check that expected modules and code are present. Verify linked-table connections separately if the application uses them.

Restore Missing VBA Modules from a Known-Good Source
Use this approach if modules are absent or unreadable after importing objects from a clean database.
Use WPS Office for Everyday Documents and Spreadsheets
WPS Office is a free, lightweight alternative for everyday office work, with a familiar interface and Microsoft Office format compatibility to make moving documents and spreadsheets easier. It does not repair Access databases or recover Access VBA projects.

Frequently Asked Questions
Why should I stop opening the database in Access 2010?
In this case, opening the database in Access 2010 is associated with corruption or missing modules. Preserve a verified clean copy and test separate copies in a supported, fully updated Access installation.
Can importing objects recover missing VBA code?
Importing modules from a clean database can recover code that remains readable in that source. If the code is already missing or unreadable, restore it from source control or a known-good backup.
Where can I check for missing VBA references?
Open Database Tools > Visual Basic, then select Tools > References in the Visual Basic editor. Review any references marked as missing before compiling the project with Debug > Compile.
Can WPS Office repair an Access VBA project?
No. WPS Office does not repair Access databases or recover Access VBA projects. Use Microsoft Access and, if needed, official Microsoft Support for database recovery.




