Advice on troubleshooting "Access has encountered an error, and must close"

  • Thread starter Thread starter Max Moor
  • Start date Start date
M

Max Moor

Hi All,

I have a form that makes Access throw an error and close itself
(i.e., Access has encountered a problem, and must close). It happens if I
switch the AllowAdditions property of the form to No, and then try to save
it. If I reopen the DB after the error, the form opens, but I get the
error again when I close it.

I was doing this to stop the single form from scrolling to the new
record, but will take care of this another way. I'm still concerned about
this happening though, and would like to know the underlying cause. (It
seems like the kind of thing that used to happen to me when I'd code a bad
pointer in C)

Does anyone have any tips about this: where I might read up on this
sort of thing, or how I might troubleshoot it?

- Max
 
It sounds as if there may be something corrupted in the form. Try creating a
new database and importing the objects from the old one to see if the
problem still occurs. Try a Compact & Repair of the database.

If you want to allow additions, just not have it go to a new record when
tabbing out of the last control of the last record then you can set the
form's Cycle property to Current Record. This will do more than just keeping
from going to a new record though, it will keep it from moving to the next
record as well when tabbing through the controls.

You can find some information on corruption here:
http://members.iinet.net.au/~allenbrowne/ser-25.html
http://members.iinet.net.au/~allenbrowne/ser-47.html
 
Back
Top