database corruption

D

diver13

This may not be in the right newgroup but here goes

Access 2000

Database becomes corrupt when it is closed.

No error messages appear. When the database is opened after the corruption
it simply closes when the data input button is clicked on the menu screen.
All other buttons on the menu screen work fine.

I replace the database with a backup and everything works fine until data is
inputted and the database is closed.

Any ideas???

Thanks

Randy
 
6

'69 Camaro

Hi, Randy.
Database becomes corrupt when it is closed.

No error messages appear.

What specific behaviors make you believe that the database is corrupted?
Does the data in certain records look like Chinese characters? Do all (or
most) forms, reports, or modules fail to open when expected? Does the
database application act bizarre during certain operations? Your
description is rather vague, so it's difficult for anyone to offer advice on
how to fix what you haven't explained is broken.
When the database is opened after the corruption
it simply closes when the data input button is clicked on the menu screen.

Does the "data input button" open a form that has a memo field bound to a
table? Editing a bound memo field is a known cause of corruption, but
without some information on what you are experiencing, it's difficult to
diagnose the problem, let alone offer advice on how to fix it.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
D

diver13

Unfortunately, I am not the designer of the database. He is long gone from
the scene.
This is what I can tell you.
When you open the database file a menu appears offering several options.
One is labeled "data input" the other options pull up reports from the
client database.
"data input" allows the user to change or add client records (information
about the status of their customers).
"data input" option is the option that is giving us a problem.
all other options work fine and continue to work fine even after the problem
occurs.

This is what happens...

When the database works correctly "data input" opens the client records in
an edit mode. After the records are adjusted as needed the user would then
close the database and Access. The user would then go back into the database
again at a later time and the main menu screen opens with no problem and all
options work except for "data input". When you click on the button for "data
input" the database and Access closes. No errors, no messages, nothing. It
just closes. Reopening Access and the database and click "data input" causes
the database and Access to close again.
After restoring the client database from backup will get the "data input"
option to work again but all changes made prior to the backup copy are gone
and once they are put back in again the problem returns.

That is all I can tell you. I do not know anymore.

Thanks

Randy
 
6

'69 Camaro

Hi, Randy.

Thanks for the clarification. Corruption is a possibility, but what's more
likely is that improper error handling is being used in the code behind the
form. If the system warnings are turned off prior to an operation that
fails, the system warnings need to be turned back on in the error handler
before the user will see the appropriate message. Without an error handler
in this case, the application crashes and the fatal error silently closes
Access while the user just sits there wondering what happened.

You, or somebody knowledgeable in VBA, needs to step through the VBA code in
the VB Editor's Debugger to see what is causing Access to choke. It could
be a corrupted record, a record not found, a renamed (or missing) table,
query, field, form -- and any of these errors handled improperly -- or a
host of other things.

Look for code such as the following:

DoCmd.SetWarnings False

.... where the corresponding code:

DoCmd.SetWarnings True

.... isn't executed as intended, due to an error occurring and code execution
jumping to either to the error handler or the previous calling procedures
and their error handlers. Either adding appropriate error handling or not
turning these system warnings off prior to a failure will allow the
appropriate error message to be displayed to the user, if this is in fact
what is occuring with your database application.

When stepping through the VBA code, start with the OnClick( ) event of the
button labeled "Data Input" on the menu form.

Once you've ruled out the probability that the application itself is
misbehaving due to unhandled/mishandled errors, then you can look at
corruption as the suspect. Corruption will get worse as time goes on or it
can be quite abrupt, by preventing the database from even opening. Look for
other bizarre behavior in the database application while you troubleshoot
this problem, which would be a strong indicator that corruption is to blame,
not the database developer.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
K

Ken Snell [MVP]

To add to '69 Camaro's comments, what you describe also can result from
having the AutoCorrect option turned ON in the database.

You need to get to the database window and click Tools | Options | General
tab, and uncheck the AutoCorrect option.
 

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