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

Invisible corruption

P: n/a
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #1
Share this Question
Share on Google+
9 Replies

P: n/a
Try a decompile.

Make a backup copy of your database while it is not open.

At the command prompt, enter something like this. It's one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\My Documents\MyDatabase.mdb"

Then open and compact the database.

If that does not solve the problem:
1. Create a new (blank) database.
2. Turn off the Name AutoCorrect boxes: Tools | Options | General.
3. Import everything from your old database: File | Get External | Import.

--
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.

"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

Nov 12 '05 #2

P: n/a
Here is some information on database corruption.
http://users.bigpond.net.au/abrowne1/ser-25.html

I would try a decompile. Make a COPY (or 2 or 3) of your file FIRST.

To decompile, open the database with the following command line:

"<path>\msaccess.exe" "<path>\mydatabase.mdb" /excl /decompile

Add to the above line any switches you would normally need for workgroup,
user name, and password. The password mentioned here is the user security
password, not the file password. If you have a password on the mdb file,
you'll have to enter that as the file opens.

Once the file is open, do a Compact/Repair. When it reopens from that, go to
a code window (Alt+F11) and to the Debug menu. Choose Compile <MyDatabase>.
Do another Compact/Repair for good measure.

--
Wayne Morgan
MS Access MVP
"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #3

P: n/a
That URL has moved to:
http://allenbrowne.com/ser-25.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.

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:BS*****************@newssvr22.news.prodigy.co m...
Here is some information on database corruption.
http://users.bigpond.net.au/abrowne1/ser-25.html

I would try a decompile. Make a COPY (or 2 or 3) of your file FIRST.

To decompile, open the database with the following command line:

"<path>\msaccess.exe" "<path>\mydatabase.mdb" /excl /decompile

Add to the above line any switches you would normally need for workgroup,
user name, and password. The password mentioned here is the user security
password, not the file password. If you have a password on the mdb file,
you'll have to enter that as the file opens.

Once the file is open, do a Compact/Repair. When it reopens from that, go to a code window (Alt+F11) and to the Debug menu. Choose Compile <MyDatabase>. Do another Compact/Repair for good measure.

--
Wayne Morgan
MS Access MVP
"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #4

P: n/a
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
Once the file is open, do a Compact/Repair. When it reopens from
that, go to a code window (Alt+F11) and to the Debug menu. Choose
Compile <MyDatabase>. Do another Compact/Repair for good measure.


No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

MichKa gave this advice a long time ago, suggesting that it was
unclear what kind of state Access would be in when opened with an
undocumented switch.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #5

P: n/a
Thanks David, that makes sense and would probably be safer.

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.78.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
Once the file is open, do a Compact/Repair. When it reopens from
that, go to a code window (Alt+F11) and to the Debug menu. Choose
Compile <MyDatabase>. Do another Compact/Repair for good measure.


No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

MichKa gave this advice a long time ago, suggesting that it was
unclear what kind of state Access would be in when opened with an
undocumented switch.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #6

P: n/a
David,

Would closing the database open up an Access 2000 user to the following if
they didn't have all their patches installed?

http://support.microsoft.com/default...roduct=acc2000

Although, a compact closes it also and may cause the same problem if this is
the case.

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.78.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

Nov 12 '05 #7

P: n/a
co***************************@hotmail.com (Wayne Morgan) wrote in
<CD*********************@newssvr11.news.prodigy.co m>:
Would closing the database open up an Access 2000 user to the
following if they didn't have all their patches installed?

http://support.microsoft.com/default...us;304548&Prod
uct=acc2000

Although, a compact closes it also and may cause the same problem
if this is the case.


I don't know. But I don't consider it a very significant risk, as
anyone who has the problem should have patched it ages ago.

In any event, when is any particular Access MDB ever not
disposable? That is, when would anyone do this kind of thing
without a backup?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #8

P: n/a
"Wayne Morgan" <co***************************@hotmail.com> wrote:
David,

Would closing the database open up an Access 2000 user to the following if
they didn't have all their patches installed?

http://support.microsoft.com/default...roduct=acc2000

Although, a compact closes it also and may cause the same problem if this is
the case.


<shrug> In my opinion you should be running SP3 anyhow.

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
Nov 12 '05 #9

P: n/a
I agree, it should be patched already. I was just "what ifing".

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<CD*********************@newssvr11.news.prodigy.co m>:
I don't know. But I don't consider it a very significant risk, as
anyone who has the problem should have patched it ages ago.

In any event, when is any particular Access MDB ever not
disposable? That is, when would anyone do this kind of thing
without a backup?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.