Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2015-02-15
5
Medium Priority
?
80 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 672 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 664 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:IT Project Mgr
IT Project Mgr earned 664 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

722 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