cannot open database because VBA project cannot be read

G

Guest

Without any provocation that I can think of, I got the message above after
opening my database this morning. The message further states that the only
way that the database can be opened is to delete the VBA project and all code
from modules, forms, and reports. This is a highly undesirable option. Yes,
I do have backups I can resort to, but I'd rather not if there is a
workaround.

The database has a meager bit of VBA associated with some forms and reports,
and I hadn't touched any of it for some time. Has anybody seen this error?
Access help was not helpful.
 
T

Tony Toews [MVP]

AccessMan said:
Without any provocation that I can think of, I got the message above after
opening my database this morning. The message further states that the only
way that the database can be opened is to delete the VBA project and all code
from modules, forms, and reports. This is a highly undesirable option. Yes,
I do have backups I can resort to, but I'd rather not if there is a
workaround.

I don't ever recall seeing this particular message although my memory
isn't perfect.

1) Make a copy

2) Try importing all the objects into a new database

3) Try a decompile. http://www.granite.ab.ca/access/decompile.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
G

Guest

Tony:

Thanks for the response. Just to clarify, do you mean for me to import the
objects from the troubled database (or a copy of it) into a blank one? Does
the fact that the troubled database had not been compiled change anything?
 
T

Tony Toews [MVP]

AccessMan said:
Thanks for the response. Just to clarify, do you mean for me to import the
objects from the troubled database (or a copy of it) into a blank one?
Yes.

Does
the fact that the troubled database had not been compiled change anything?

No.

Tony

--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Joined
Mar 28, 2009
Messages
4
Reaction score
0
I have similar problem. Would it work if I keep all the tables and delete forms and reports etc. I will create new forms and reports.
 
Joined
Aug 6, 2012
Messages
1
Reaction score
0
Without any provocation that I can think of, I got the message above after
opening my database this morning. The message further states that the only
way that the database can be opened is to delete the VBA project and all code
from modules, forms, and reports. This is a highly undesirable option. Yes,
I do have backups I can resort to, but I'd rather not if there is a
workaround.

The database has a meager bit of VBA associated with some forms and reports,
and I hadn't touched any of it for some time. Has anybody seen this error?
Access help was not helpful.

You need to compile the VBA on the server when you have multiple users and not on an individuals PC. Then create a accde file and rename to accdr for runtime users.

When you compile the VBA on an individuals computer you stand the risk of only including the one users defaults. It sometimes works and sometimes not. But to make it work, compile from the server only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top