VBA Project Issue

Strikertom

New member
Local time
Today, 00:30
Joined
Jan 17, 2014
Messages
9
Hello,

I hope that you can help me (God I hope you Can), my master database had a slight hiccup today and it appears that now the VBA code is corrupt.

I have checked my backups that are taken every day and every backup from Wednesday shows the same error, which I find curious, as I created a new ACCDE yesterday and no issues were highlighted.

I get the following error message:

"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."

If there is no solution I Think I will have to re-do all my work from Wednesday onwards :(

any help would greatly appreciated please.

Thanks
Tom
 
re-do all my work
This depends on what your "work" is. The data is fine. Were you developing code? Is that what your "work" is, and if so, that might be lost.
 
Hi Mark,

thanks for your reply, the work as I mentioned is mainly Queries and VBA, however the database has been in development for the past several months, and when I open the database none of the VBA works, and if I press "OK" on the error message box, all the code in the entire system is deleted.

like I said, I have a backup from Tuesday that seems to be working but I will have lost a considerable amount of work that I have done this week, I'd rather try and fix the issue if possible before I start all over again.

Tom
 
Some things you could try. First, work on a copy so you can always go back to the starting point.

Try decompiling by opening the database through a command line
Path\msaccess.exe YourDB.accdb /decompile

Try creating a blank database and importing modules. If it fails midway, repeat the process but do it module by module. Maybe only one module is corrupt. Do the same for forms, queries, reports.

Try exporting database elements as text files and importing into a blank database.
 

Users who are viewing this thread

Back
Top Bottom