469,282 Members | 1,734 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

VBA project is corrupt

When I'm trying to open my Access 2003 database - I receive this error:
"The Visual Basic for Applications Project in the database is corrupt."

Please let me know if there is any way to recover the VBA codes from the application's module.
Nov 13 '11 #1
4 10016
Stewart Ross
2,545 Expert Mod 2GB
You could try a compact and repair on the database first.

In my experience of this type of problem if compact and repair does not resolve it then it is unlikely that other approaches (such as trying to import the module into another database) will be successful, in which case restoring a known-good copy from a recent backup is required.

-Stewart
Nov 13 '11 #2
NeoPa
32,173 Expert Mod 16PB
If you can open the code then I would try copying it out and pasting it back in again (then recompiling).

Each purely code module can be deleted and recreated but any object modules must be set back to (essentially) empty as deleting the object has more ramifications than just deleting the code.

If you can't see the code even, then you should have included that information in the question (You should have explained anyway to be honest).
Nov 13 '11 #3
ADezii
8,800 Expert 8TB
Try Decompiling/Compile/Compact the Database before you do anything:
  1. Execute the following, or create the following Shortcut (depending on Version):
    Expand|Select|Wrap|Line Numbers
    1. C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE /decompile
  2. From Access, Open the Database you want to Decompile.
  3. Open up any Module, Compile it, then Save it.
  4. Go back to the Database and Compact it.
Nov 13 '11 #4
OldBirdman
675 512MB
You could try Microsoft's undocumented utility: Jet Compact Utility. This is described at http://office.microsoft.com/en-us/ac...570.aspx?CTT=1
This has worked for me when I could not otherwise open a 2003 database.
Nov 14 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Joe | last post: by
4 posts views Thread by mcwooq | last post: by
4 posts views Thread by GS | last post: by
3 posts views Thread by mdavidjohnson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.