By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,432 Members | 795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,432 IT Pros & Developers. It's quick & easy.

VBA Project corrupted - How to recover?

P: n/a
I cannot open my Access 2003 database - I receive this error:

"The Visual Basic for Applications Project in the database is corrupt."

I understand that sudden and inexplicable failures like this are to be
expected, so I have a backup.

I was able to get to the database window and can export individual tables
and queries - but is there a way to do this in a batch, rather than one by
one? The database has *a lot* of tables and queries.

Are there other ways to recover a database in this condition?

Thanks in advance!

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Are you able to make a new (blank) database, and import the existing tables?

General suggestions for recovering corruption:
http://members.iinet.net.au/~allenbrowne/ser-47.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"deko" <ww*******************************@nospam.com> wrote in message
news:ts*******************@newssvr21.news.prodigy. com...
I cannot open my Access 2003 database - I receive this error:

"The Visual Basic for Applications Project in the database is corrupt."

I understand that sudden and inexplicable failures like this are to be
expected, so I have a backup.

I was able to get to the database window and can export individual tables
and queries - but is there a way to do this in a batch, rather than one by
one? The database has *a lot* of tables and queries.

Are there other ways to recover a database in this condition?

Thanks in advance!

Nov 13 '05 #2

P: n/a
> Are you able to make a new (blank) database, and import the existing
tables?

No - I can only export (from the corrupted mdb). If I try to import, I get
an error. I looked at that link - I think the problem may have been
power-related.
Nov 13 '05 #3

P: n/a
Okay. It is possible to get a list of all the local tables in the database:
SELECT MsysObjects.Name FROM MsysObjects
WHERE (([Type] = 1) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY MsysObjects.Name;

You could then DoCmd.TransferDatabase to export them.

However, I would expect that process to fail as soon as it reaches one of
the corrupted tables/indexes.

When you reach a table that won't export, you could try deleting all the
relations and indexes.

You may also want to try the undocumented SaveAsText. Once you get the table
out to a text file, use LoadFromText to get it into the new database.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"deko" <ww*******************************@nospam.com> wrote in message
news:%S******************@newssvr14.news.prodigy.c om...
Are you able to make a new (blank) database, and import the existing

tables?

No - I can only export (from the corrupted mdb). If I try to import, I
get
an error. I looked at that link - I think the problem may have been
power-related.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.