Solved

Access 2013 Issue Loading VBA

Posted on 2013-06-12
11
1,616 Views
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!
0
Comment
Question by:EdwardAF
  • 6
  • 5
11 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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.

Jim.
0
 

Author Comment

by:EdwardAF
Comment Utility
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?
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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".

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
BTW, what format is the DB in?

Jim.
0
 

Author Comment

by:EdwardAF
Comment Utility
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.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
What format is it in and a import did not work either?

Jim.
0
 

Author Comment

by:EdwardAF
Comment Utility
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.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<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.

Jim.
0
 

Author Comment

by:EdwardAF
Comment Utility
Ah, thank you.  The file is ACCDB.  Let me try the import.
0
 

Accepted Solution

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

Author Closing Comment

by:EdwardAF
Comment Utility
Nothing else worked.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now