corrupt database? Need help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When the database is first opened, I have a welcome screen. A user presses a
button to open the main form, but now the database is exiting. Any amount of
repairing and compacting won't sort it out.
 
scubadiver said:
When the database is first opened, I have a welcome screen. A user
presses a button to open the main form, but now the database is
exiting. Any amount of repairing and compacting won't sort it out.

There are a couple of alternatives to try. My favourite, is using the
/decompile option - check out
http://www.granite.ab.ca/access/decompile.htm
for step by step instructions

on the same site, also check out this
http://www.granite.ab.ca/access/corruptmdbs.htm
with lot of information about corruption.

Note - work on backups!
 
Didn't read the links, but if they didn't mention it, one option that has
got me out of it a few times, is to create a new empty database, and import
the tables/queries etc from your corrupt one into the new one..

Cheers,

Chris.
 
thanks for the reply.

I have the following message: "An error occurred while loading
'Report_Department information'. Do you want to continue loading the
project?".

If I click "yes" it says "Invalid procedure call or argument". I click on
"okay", it takes me to the VBA page.

If I click "no" it says "The visual basic for applications project in the
database is corrupt."

What now?
 
I have a new message:

"The report name 'Dep' you entered in either the property sheet or macro is
misspelled or refers to a reports that doesn't exist."
 
scubadiver said:
I have a new message:

"The report name 'Dep' you entered in either the property sheet or
macro is misspelled or refers to a reports that doesn't exist."

I don't understand. If this message occured while trying /decompile,
then you are doing something wrong. You need to disallow any running of
code when doing this. As stated in the article, you need to hold the
Shift key while doing this process. Even if it doesn't say so, also
hold
the Shift key also while doing compact.
 
Do I hold the shift key before I click on the .bat file? (I am running
V2000)? I am still getting the same message. I've never decompiled before so
I don't know what am I doing wrong.

I am also still getting the same problem I explained in my original message.
 
scubadiver said:
Do I hold the shift key before I click on the .bat file? (I am
running V2000)? I am still getting the same message. I've never
decompiled before so I don't know what am I doing wrong.

I am also still getting the same problem I explained in my original
message.

First close all instances of Access.

Then, perhaps select the batfile first, hold the shift key, then double
click the bat file, or right click the bat file and select open.

Holding down the shift key, should normally disallow any running
of code. The messages you get, indicates that there are some code
running and/or forms or reports opening, that tries to reference
forms or reports etc. For a decompile to have the desired effect,
it is important that no code runs.

When the database window occurs, close the db, and close Access.

Open Access again, hold the shift key, and open the this db again or,
doubleclick the mdb file, also while pressing shift key.

In the Tools menu, find Database Utilities, and compact & repair BUT
be sure to hold the Shift when selecting Compact and Repair.

When you see the database window again, hit ctrl+g or enter any module
and do a debug | compile.

Then, do a compact and repair again.
 
thanks for that.

When running the .bat file I encountered loading error with one of my
reports so I deleted it.

1) I press the shift key while running the .bat file and then close the
database.
2) re-open the database while pressing the shift key
3) run compact and repair while holding shift key.
4) Ctrl+G and run compile option. I have repeated this until option is no
longer available. Has asked me to save the forms, click "yes".
5) Close the database, re-open and compact and repair.

I have done all this. But when I open the database as a user and try to
click on the button that opens the main form, the database exits. It also
does this when I try to create a macro.
 
scubadiver said:
thanks for that.

When running the .bat file I encountered loading error with one of my
reports so I deleted it.

1) I press the shift key while running the .bat file and then close
the database.
2) re-open the database while pressing the shift key
3) run compact and repair while holding shift key.
4) Ctrl+G and run compile option. I have repeated this until option
is no longer available. Has asked me to save the forms, click "yes".
5) Close the database, re-open and compact and repair.

I have done all this. But when I open the database as a user and try
to click on the button that opens the main form, the database exits.
It also does this when I try to create a macro.

Hm - /decompile or copy to another db doesn't always resolve all
corruption, here's another attempt. For both the form on which you
press this button, and the main form, try the .SaveAsText and
..LoadFromText methods - NOTE - in a copy of the db!

In the immediate pane (ctrl+g), try

application.saveastext acform, "NameOfForm", "c:\NameOfForm.txt"
application.loadfromtext acform, "NameOfForm", "c:\NameOfForm.txt"

then debug | compile, and save
 
I now have an application error: "memory can't be read".

Will deleting and re-organising my VBA code do anything or is it something a
bit deeper?
 
For the "welcome" form I don't have a problem. When I repeat the code for
"employee" the database exits.
 
scubadiver said:
For the "welcome" form I don't have a problem. When I repeat the code
for "employee" the database exits.

This might indicate a corruption beyond what can be recovered through
these methods, but now we're getting out of my legue, I'm afraid.

You could perhaps try:

Import all of the other objects to a new database. Import this form
from a recent backup. There might be beginning corruption for this
form even in the backup, so you might perhaps try the import through
"dumping" it to a text file from your recent backup through the
..SaveAsText method, and importing it in the new db through the
..LoadFromText method.

If you don't have a recent backup - bad developer ;-)

A friend of mine once said, "Real men don't backup - but often cry"

You might try the method described here
http://support.microsoft.com/?id=304548
but this will probably mean that you'll have to reattach every event
procedure to it's event handler, afterwards - or recreate the whole
form.

Regarding the previous message, have you tried any of this on another
computer than your current? Would that make any difference? Sometimes
there can be hardware issues too, as indicated in the "corruption
sympoms" page in the second link in my initial reply.
 
A bit daft me not thinking. I copied the two forms from a week old copy that
does work and pasted them into the copy of the latest version. I still get
the same problem.

I have created a new database and imported all the objects apart from the
forms. When I click on the tab to import the forms, it crashes!! argh!

I think it may require a re-start.
 
I decided to import my objects and delete all my buttons and VBA code. It was
a bit of a mess.

The DB now seems to be working fine.
 
scubadiver said:
I decided to import my objects and delete all my buttons and VBA
code. It was a bit of a mess.

The DB now seems to be working fine.

I'm glad to hear that you fixed it!
 
A friend of mine once said, "Real men
don't backup - but often cry"

If it weren't so true, I'd be LOL.

As it is, I am filing it right in my "real men quotes" archive.

I once worked with a colleague, about the time the book, "Real Men Don't Eat
Quiche" was in vogue, whose ultimate epithet for those he disrespected was
"Quiche eaters!"

Larry Linson
 

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

Back
Top