Visual Basic Database Corrupt

C

Carol

Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.
 
B

Bruce M. Thompson

Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.

You might have better luck if you create a new blank database and *import* your
tables, queries and macros into it.

If you haven't already, you could try to restore your VBA project using the
decompile option. There is an *unsupported* "decompile" switch (available in
Access 97, 2000, 2002 and, presumably, 2003) that can be used to help correct
this situation, but this is more of a "last resort" in that there is some risk
to the file as described in http://www.trigeminal.com/usenet/usenet004.asp?1033
(so ... work with a copy of the file). Further information is available at
http://www.databasecreations.com/DatabasePerformanceTips.pdf and
http://www.granite.ab.ca/access/decompile.htm. The procedure I use when
implementing this is as follows (it might not work when you can't open the
project without an application error, but it might be worth a try. Just hold
down the <Shift> key when opening the problem file in steps 2 and 3 of the
following recovery procedure and keep holding down that key until you close
Access each time):

1) BACK UP YOUR MDB FILE!
1) BACK UP YOUR MDB FILE! (I meant it the first time <g>)
2) Compact the MDB.
3) Implement the "/decompile" as described in the articles I referenced.
(Access 2000, and later, don't provide the confirmation dialog that
existed in Access 97, but the decompile will still take place.)
4) Open Access normally and compact the MDB again to clean up.
5) Compile and save.
6) Compact again before testing/using.
 
S

Sandra Daigle

Hi Carol,

What version of Access? Are you current on SRs and SPs?

Before you do anything else, make a backup of the corrupt db - hang on to a
copy until you are sure that you've recovered as much as you can from it.
Frequent backups are essential anyway so hopefully you have some recent
backups to refer to if necessary.

After you cancel the Access program using Task Manager try creating a new
database and then while in the new database, import all the objects from the
old one into the new one. Post back if this doesn't help. FWIW, I've noticed
that sometimes it is one form or report that is corrupt and if I do the
import, in small batches of objects, I can isolate the one that is corrupt
and avoid importing it into the new db. Tedious yes, but I've always managed
to recover the db (minus the one corrupt object).

Also check Tony Toew's page on db corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm. Here you will find tons of
valuable information on the causes and cures for corruption (including links
to several repair services)
 
J

John Vinson

Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.

You can salvage them by creating a new, empty database and using
File... Get External Data... Import to import them.

To avoid this error, *mostly* - it catches all of us! - you should
Compile the project after *any* change to any VBA module; regularly
compact your database; and (IME) occasionally Decompile your database.
It's even helpful to do the new database/import everything trick once
in a while just to recover space and remove rubbish that Compact seems
to miss.

And of course - regular, up to date backups are *ABSOLUTELY*
essential and often overlooked!
 
C

Carol

I am running 2002.

The problem is when I open the file the error message
stays on top and won't let me into do anything else.

If I try the compact and repair command, the same error
message pops up.

-----Original Message-----
Hi Carol,

What version of Access? Are you current on SRs and SPs?

Before you do anything else, make a backup of the corrupt db - hang on to a
copy until you are sure that you've recovered as much as you can from it.
Frequent backups are essential anyway so hopefully you have some recent
backups to refer to if necessary.

After you cancel the Access program using Task Manager try creating a new
database and then while in the new database, import all the objects from the
old one into the new one. Post back if this doesn't help. FWIW, I've noticed
that sometimes it is one form or report that is corrupt and if I do the
import, in small batches of objects, I can isolate the one that is corrupt
and avoid importing it into the new db. Tedious yes, but I've always managed
to recover the db (minus the one corrupt object).

Also check Tony Toew's page on db corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm. Here you will find tons of
valuable information on the causes and cures for corruption (including links
to several repair services)

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.

.
 
C

Carol

Thank you John.

I have tried to import to a new database but the same
error message pops up and will not let me gain access to
access. ugg

Holding down the Shift key doesn't help either.
 
S

Sandra Daigle

Hi Carol,

Just to be clear, you should be in the *new* database when you try to
*import*. From the new mdb goto

File->External Data->Import

and select the objects. Do you still get the error? How about if you try to
import a single object?


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

I am running 2002.

The problem is when I open the file the error message
stays on top and won't let me into do anything else.

If I try the compact and repair command, the same error
message pops up.

-----Original Message-----
Hi Carol,

What version of Access? Are you current on SRs and SPs?

Before you do anything else, make a backup of the corrupt db - hang
on to a copy until you are sure that you've recovered as much as you
can from it. Frequent backups are essential anyway so hopefully you
have some recent backups to refer to if necessary.

After you cancel the Access program using Task Manager try creating
a new database and then while in the new database, import all the
objects from the old one into the new one. Post back if this doesn't
help. FWIW, I've noticed that sometimes it is one form or report
that is corrupt and if I do the import, in small batches of objects,
I can isolate the one that is corrupt and avoid importing it into
the new db. Tedious yes, but I've always managed to recover the db
(minus the one corrupt object).

Also check Tony Toew's page on db corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm. Here you will find
tons of valuable information on the causes and cures for corruption
(including links to several repair services)

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.

.
 
C

Carol

Thank you, Thank you.

I was not able to save the original database but I was
able to access the tables and queries and I have restored
my information.

The Trigeminal Software Site you referred to was a
tremendous help.
 
C

Carol

Thank you Sandra.

I was finally able to recover my tables and queries.

Bruce M. Thompson sent me to a wonderful sight and while
I couldn't save the original database I could at least
get into the data section.


-----Original Message-----
Hi Carol,

Just to be clear, you should be in the *new* database when you try to
*import*. From the new mdb goto

File->External Data->Import

and select the objects. Do you still get the error? How about if you try to
import a single object?


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

I am running 2002.

The problem is when I open the file the error message
stays on top and won't let me into do anything else.

If I try the compact and repair command, the same error
message pops up.

-----Original Message-----
Hi Carol,

What version of Access? Are you current on SRs and SPs?

Before you do anything else, make a backup of the corrupt db - hang
on to a copy until you are sure that you've recovered as much as you
can from it. Frequent backups are essential anyway so hopefully you
have some recent backups to refer to if necessary.

After you cancel the Access program using Task Manager try creating
a new database and then while in the new database, import all the
objects from the old one into the new one. Post back if this doesn't
help. FWIW, I've noticed that sometimes it is one form or report
that is corrupt and if I do the import, in small batches of objects,
I can isolate the one that is corrupt and avoid importing it into
the new db. Tedious yes, but I've always managed to recover the db
(minus the one corrupt object).

Also check Tony Toew's page on db corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm. Here you will find
tons of valuable information on the causes and cures for corruption
(including links to several repair services)

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Carol wrote:
Cannot open database. Error Message is Visual Basic for
Applications Project in this database is corrupt.

Microsft Knowledge base Article 248960 indicates that
forms, reports and modules are affected and cannot be
restored.

It goes on to say that you can save your tables, queries
and macros by creating a new blank database and export
these to the new database.

Problem is that I cannot gain access to my tables,
queries and macros because the error message will not
close. I have to use my Windows Task Manager to get out
of the program.

.

.
 

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