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 57
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 57
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".

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

LVL 57
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 57
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 57
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
access vba 5 59
Access Query function 4 54
Add Underline to custom Caption on Label 4 37
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

710 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