Access 2013 Issue Loading VBA

Posted on 2013-06-12
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".

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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.

630 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