Solved

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

Posted on 2015-02-15
5
72 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 50

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 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