Control on Form forces Access to shut down

  • Thread starter Thread starter Pele
  • Start date Start date
P

Pele

I created a simple form to add data to a table and things
were going fine until today. I noticed that anytime I
entered data into one of the textboxes, a window pops up
warning me that Access has encountered an error and it
will need to shut down. It then says it will generate an
error report but I don't know where to find that.

Anyway, I was troubleshooting the textbox and I noticed
that if I took out my expression for data validation
everything worked fine. The two versions of the expression
are:

Is Null Or Len([text2])=4

[text2] Is Null Or Len([text2])=4

Note that these expressions were working yesterday. I
don't know why they are causing Access to shut down. And I
don't know where the error log is.

Toks
 
I tried that and Access still locks up. This problem only
hapens when I type into this particular textbox; all the
other textboxes don't cause any problem.

Any other ideas will be appreciated.

Pele

-----Original Message-----
I would have expected something more like...


IsNull([Text2]) or Len([tex2])=4



Rick B


I created a simple form to add data to a table and things
were going fine until today. I noticed that anytime I
entered data into one of the textboxes, a window pops up
warning me that Access has encountered an error and it
will need to shut down. It then says it will generate an
error report but I don't know where to find that.

Anyway, I was troubleshooting the textbox and I noticed
that if I took out my expression for data validation
everything worked fine. The two versions of the expression
are:

Is Null Or Len([text2])=4

[text2] Is Null Or Len([text2])=4

Note that these expressions were working yesterday. I
don't know why they are causing Access to shut down. And I
don't know where the error log is.

Toks


.
 
I would delete the txtbox and recreate another one from scratch with the
same properties & code (actually, create the fresh one first; then you can
refer to the existing broken one while you set properties). Reason being,
with such flaky behavior from Access, I would suspect a corrupt object.

Don't make a copy from this txtbox since you will copy any corruption
(although you would probably be fine to copy/paste VBA code and/or
individual properties across).

I have had this happen with entire forms as well. In those cases, first of
course compact/repair, or import into new db, but may or may not help, but
as last resort, I recreate the actual form which is a pain. In fact, in
your case if there is corruption, it actually could be the form that is
corrupt, not the individual control.

Since this is just a simple textbox, recreating it is no biggie. Hey, it's
something to try.

Ruling all that out, you need to examine closely any & all properties,
rowsource code, that are unique to this txtbox. Put the same props/code on
another one that works. If they are the cause, the others will fail as
well. Just go one step at a time.
 
Back
Top