Corrupt form...or so it seems

  • Thread starter Thread starter Tracy
  • Start date Start date
T

Tracy

Hello All,

First of all, let me thank you for all for the hours of work this
newsgroup has saved me! But now I've got a problem I can't find a
posting for so I need your help.

I've got a form that's corrupting my database...or so I think.
Sometimes it works fine, but three times now when the user goes to
edit the data in one of the text boxes the underlying record is
spontaneously deleted and the table (the customer table...naw that's
not important) is corrupted. Repairing the backend has done the trick
so far, but my client understandably wants a stable program (imagine
that).

The record deletion is happening when they add to or change text in a
text field for an existing record (and it's not a problem with the
text box since it's happened on two different text boxes). My point is
that it's NOT happening upon saving the record, or even moving to
another control. There's no code anywhere in the form to delete the
record, and Allow Deletions is set to NO. I don't get a corruption
error when I open the form, and sometimes it does work fine, but that
sure sounds like a corrupt form to me. For the record, they tell me at
the moment it happens that it just "freezes up"...I can't get a
specific error message out of them, if there is one. By the time I
get there, upon opening up the app it gives me an "invalid argument"
error when it tries to open the default form, which is based on a
query which pulls from the now corrupt customer table. Does that
sound like a corrupt form to you?

So here's my plan. I'm going to starts with a new db. Pull in all
the stuff, *except this friggin' form*, from my existing database and
rebuild my customer form from scratch.

The problem has only happened on this one form, but is that enough
information to say that the form, indeed, is the source of the
problem? Or could the problem lie in the underlying table?

So should I also build a new backend, or at least a new customer
table?

Any suggestions would be much appreciated.

Thanks!
Tracy
 
Tracy, 2 things come to mind from your description. The first is you stated
that the form is based on a query. Is it possible that the query that the
form is based on uses the values you are changing as criteria? In other
words is the data still in the table, but no longer meets the criteria to be
displayed on the form. Another thing, do you have relationships built that
would cascade updating/deleting etc. joined records in other fields. 2
other things to check/set to make sure the error message pops up. Open the
db in design view. Select Tools/Startup from the main menu. Click the
Advanced button and make sure Use Access Special Keys is selected. Now
press Alt:F11 to open the code window. Select Tools/Options and select the
General Tab. Make sure break on unhandled errors is selected.
 
The only time that I've gotten an "Invalid Arguement"
error was when my db exceeded the 2Gb limit. Compacting
the db takes it back down below 2Gb and so the error goes
away. You might want to check on the size of your backend
(no pun intended).

If it is too big, move some of your tables to a second
backend and link them back into the original.
 
Hi Reggie,

Thanks for taking the time to help me with my problem (people helping
people, it's a beautiful thing...).

Your suggestions for possible sources of the problem are great places
to look, but don't apply in this case (see below). I truly think this
form is corrupt and the source of my problem. I've never had an app
with a corruption problem like this so I'm in uncharted territory and
looking for a little guidance on corruption-recovery. I'm going to
start from a new db and pull in everything except this one form, and
re-design that from scratch. Any suggestions for how else to
"corrupt-proof" my app would be great appreciated.

Specifically let me address your questions:

<The first is you stated that the form is based on a query. Is it
possible that the query that the form is based on uses the values you
are changing as criteria? In other words is the data still in the
table, but no longer meets the criteria to be displayed on the form.>

Sorry if I wasn't clear in my original post, but the recordsource for
the form that I think is corrupt is the Customers Table (not a query).
And the record *really* is gone (not just missing from a query
result).

The form that IS based on a query is the form that appears on startup,
which draws information from, among other things, the Customers Table.
This is where I'm getting the "invalid argument" error after the
customers table has been corrupted. This form isn't meaningful to my
problem, it just happens to be where the first error message appears
after re-starting the application after the Customers table has blown
up.

<do you have relationships built that would cascade updating/deleting
etc. joined records in other fields.>

There's no cascade delete issue - the record is disappearing from the
Customer table, the same table the (corrupt?) form is based on.
open the code window. Select Tools/Options and select the General
Tab. Make sure break on unhandled errors is selected.>

Already set to break (an error message could very well be popping up
when it "craps out" as my user put it, but these boys have actual
*work* to do and documenting my error messages are WAY down their list
of their priorities!).

At this point, simply re-designing the form from scratch seems the
fastest way to get this app up and running reliably. I just hope
that's ENOUGH to get it up and running reliably!

I really appreciate you taking the time!
Tracy
 
Hi Ernie,

The size of my backend is just fine (pun intended). This app has only
been up and running for two weeks so it's only like 20 megs.

The 'invalid argument' is coming from the query my startup form is
based on, because it's freaking out trying to draw info from my
Customers Table which has been corrupted. I know for a FACT that the
customers table is getting corrupted. And I know for a FACT that the
user is in my Customer Edit form when the app blows. And I know for a
FACT that not only does my app freeze, but the record they were
working on gets deleted (and this deletion is what's corrupting the
customers table...or perhaps more likely the corruption is causing the
deletion). Either my form, or the table is the problem.

My question is really how to best prevent the chances of corruption
when I give them Release B on Monday? Other than re-design my form
from scratch, what can I do to make sure this doesn't happen any more?

I appreciate you taking the time (even if you did comment on the size
of my backend).
Tracy
 
Hi Ernie,

The size of my backend is just fine (pun intended). This app has only
been up and running for two weeks so it's only like 20 megs.

The 'invalid argument' is coming from the query my startup form is
based on, because it's freaking out trying to draw info from my
Customers Table which has been corrupted. I know for a FACT that the
customers table is getting corrupted. And I know for a FACT that the
user is in my Customer Edit form when the app blows. And I know for a
FACT that not only does my app freeze, but the record they were
working on gets deleted (and this deletion is what's corrupting the
customers table...or perhaps more likely the corruption is causing the
deletion). Either my form, or the table is the problem.

My question is really how to best prevent the chances of corruption
when I give them Release B on Monday? Other than re-design my form
from scratch, what can I do to make sure this doesn't happen any more?

I appreciate you taking the time (even if you did comment on the size
of my backend).
Tracy
 
Sounds like you're on the right track. Have you tried editing the records
directly in the table to see if anything happens? I would try it on the
machine/server where the actual BE is located and via the machine(s) where
this occurs. Then I would design a nice simple form based on this table and
try editing it before totally redesigning. Also, I assume all the users
have the proper read/write authorities for the file and that the server is
healthy. And 2 other things, maybe a virus scan and making sure you have
all the latest software patches etc. Sorry I couldn't help more. Good
luck.
 
Back
Top