Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2013 Issue Loading VBA

Posted on 2013-06-12
11
Medium Priority
?
1,840 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 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.

Jim.
0
 

Author Comment

by:EdwardAF
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?
0
 
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".

Jim.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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

Jim.
0
 

Author Comment

by:EdwardAF
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.
0
 
LVL 58
ID: 39254566
What format is it in and a import did not work either?

Jim.
0
 

Author Comment

by:EdwardAF
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.
0
 
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.

Jim.
0
 

Author Comment

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

Accepted Solution

by:
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.
0
 

Author Closing Comment

by:EdwardAF
ID: 39303711
Nothing else worked.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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

877 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