Solved

The database cannot be opened because the VBA project contained in it cannot be read

Posted on 2015-02-15
5
75 Views
Last Modified: 2016-05-22
See the picture.   I get the following error when I open my database.   We can click through it and continue, but it is problematic in that it creates support calls.   Any suggestions?
Capture.JPG
0
Comment
Question by:Gary Fuqua, CISSP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Accepted Solution

by:
Leo Alexander earned 168 total points
ID: 40611684
Something became corrupted in that database. You can shift+open the database to get in and do a repair and compact, or if that does not work, create a new database and import everything in from this (corrupted version) to the new one that you just created. I would recommend splitting the database to have tables separate from the forms and vba. Also, create .mde/accde versions that you distribute as they are less likely to become corrupted/manipulated.
0
 
LVL 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 166 total points
ID: 40611758
If you wish to have your code, I have found no way to get around this other than reverting to a backup.

To me it has happened only when working for a longer time with a frontend off a network drive, thus I always use a copy on a local drive when making design changes except for very simple changes.

/gustav
0
 
LVL 1

Assisted Solution

by:itprojks99
itprojks99 earned 166 total points
ID: 40612197
smarturtle and Gustav are both correct.  It looks like the database is corrupted, and you should fix it soon before it doesn't open at all.  If your data tables are in the same database as your forms/reports, etc. then restoring from a backup will obviously lose any more recent data.   This is why it is a good idea to keep the data tables in a separate "back-end" database, and link to them from your front-end application database.  
If you can't restore from a backup copy that doesn't have this error, then here are the steps you can take to try to recover and repair the database, in increasing order of effort:

1)  Compact and Repair:  Hold the shift key down while opening the database - this should (hopefully) give you access to the Access menu and navigation pane.  Open the Database Tools menu, and click "Compact and Repair".  However, based on your error message, this probably won't do the trick.

2) Decompile / Recompile:  
2.1) Hold the shift key down, while opening the database with a shortcut to the database something like this: "{Insert path to your MS Access version .exe file" "{Insert path to database file here}" /decompile
2.2)  Press Shift-11 to get to the VBA window,  Click on the "Debug" menu, then Compile.  When it is done, click on the "Save" icon in the VBA window.
2.3) Go back to the Access window, and select "Database Tools" menu, and click "Compact and Repair".

3) Create a New Database and Import all the objects to the new database.  Then repeat step 2).
If you undertake this, you may have to import not only all the objects (queries, forms, reports, macros, modules), but also any custom menus, relationships, etc. in the options for importing.  This is probably the most time consuming option but is sometimes the only hope of recovery.

Hope this helps!
0
 
LVL 3

Author Comment

by:Gary Fuqua, CISSP
ID: 40673475
Thanks Guys.   Will try these this week.  Sorry for the delay.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question