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


Access 2013 Issue Loading VBA

Posted on 2013-06-12
Medium Priority
Last Modified: 2013-07-06
Hello, I am using MS Access 2013 64-bit (15.0.4481.1001), and in that product I created a database, which includes quite a bit of VBA code.  Today, when I open the database, I receive the error:

"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 modules, forms and reports.  You should back up your database before attempting to open the database and delete the VBA project.  To open the database and delete the VBA project, click OK."

I haven't done anything that I'm aware that might cause an error like this.  I haven't made changes to the code in weeks.  I haven't installed any updates recently.  I haven't uninstalled, reinstalled, or messed with the installation of Access.  It's just: one day, my database opens and works as expected, and the next day I get this error.

I don't even mind doing some recovery work if I have to.  The data portion of the database is intact.  My biggest concern is retrieving all the VBA code, which took several months to write and debug.  Yes, I do have backups of the .accdb file, but loading the backups shows the same error.  

How can I either a) get the database to open with its VBA intact or b) save the VBA code somewhere as text before taking the prompt's advice and deleting it?

I use this database mini-app daily and rely on it.  Any help is greatly appreciated!
Question by:EdwardAF
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
  • 6
  • 5
LVL 58
ID: 39243081
I would first reboot the machine in question and try again.  Seems odd you've been using the DB, yet it now shows errors and so do the backups.

 Also try another machine with 64 bit Office.

 It may be a case of something wrong with the environment rather then the DB's.


Author Comment

ID: 39248601
That was my thought, too.  I did reboot, and there was no change.  I also tried to load the database on 3 separate machines under both 64 and 32 bit Access.  The errors are the same.  Has anyone else run across this weird issue?
LVL 58
ID: 39248932
Well I poked around a bit and this is coming up quite frequently.

A2010 had an issue with compiled MDE's and 32/64 bit.

 See if you can create a blank accdb and then import from the old DB.

If not, on a backup copy, you can try using /decompile from the command line when opening Access:

"C:\...\MSACCESS.EXE" /decompile "C:\...\myApp.Accdb"

 and see if it will open that way.

 When you open the command box, make sure you right click and do a "Run As Admin".

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 58
ID: 39248938
BTW, what format is the DB in?


Author Comment

ID: 39254382
I tried the decompile command as described above - there was no change.  The database is in 64-bit Access 2013 format.  Bear in the mind that the data is all there; it's the VBA code that I can't access.  I appreciate any other thoughts that you may have.
LVL 58
ID: 39254566
What format is it in and a import did not work either?


Author Comment

ID: 39267124
I guess I don't understand the question - it's in 64-bit Access 2013 format.  There's no need to import - the data is all there.  It's the code I need to recover.  The decompile command did nothing.
LVL 58
ID: 39267219
<<What format is it in >>

 is this an ACCDB or an ACCDE with all the code stripped out?

<< There's no need to import - the data is all there.>>

 I meant try creating a fresh DB and then importing into it from the corrupt DB.  That may work where as trying to run it may not.


Author Comment

ID: 39267229
Ah, thank you.  The file is ACCDB.  Let me try the import.

Accepted Solution

EdwardAF earned 0 total points
ID: 39291196
Nothing worked.  I have to abandon the effort, as it is taking too long.  Thank you everyone for your thoughts.

Author Closing Comment

ID: 39303711
Nothing else worked.

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

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.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

664 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