Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Project is corrupt

Status
Not open for further replies.

jdspinelli

Programmer
Jul 9, 2010
20
US
Good morning:

Let me start by saying this website has been most helpful - I appreciate the moderators and contributors.

When opening my most recent .accdb file this morning, I was informed that the code was corrupt with the following 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 the modules, forms and reports. You should back up your database before
attempting to open the database and delete the VBA project.

To create a backup copy, click Cancel and then make a backup copy of your database. To
open the database and delete the VBA project without creating a backup copy, click OK. >

Is my only option to return to my most recent backup? I have some .accdr and .accde files that came from the .accdb I am working on. There is no way to convert an .accde back to an .accdb is there?

I am simply looking for the best recovery method. Thanks in advance for your help.

Joe
 
There are ways to convert back from a accde to a accdb, but free versions only recover the form and reports. I have not seen a free method of recovering the code. That you would most likely have to pay for, and there are resources out there.

However here are a few things to try first with your accdb. Make sure to make a copy before starting. Try compact and repair. There is a MS jet compact utility as well:

If that does not work. See what objects can be imported into a new clean database.

If that does not work look at decompiling.
 
Sometimes I can recover this by creating a new blank database, and importing all the objects from the old to the new. Last resort: the decompile has never failed (yet).
Always back up!

Ni neart go cur le cheile.
 
Good Morning:

In Access 2007, Access Options you can choose the Default file format in which to save a new database, e.g., 2002-2003, 2007 etc. Once that has been chosen, how do you save that setting, without having to choose it everytime you open Access?

Thanks in advance,
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top