Error 2001 You Canceled the previous operation

  • Thread starter Thread starter John A.
  • Start date Start date
J

John A.

This is a database in use on Terminal server, been reliable, no corruption
problems. (so far)

Designing a form, asked to save objects, Access put up a dialog box for the
current form asking me to change the name. Clicked 'Cancel'. From this
point forward every time I try to open the form from code I get error 2001
You canceled the previous operation. If I click Debug, the line is a
docmd.openform frmname. If I reset and then try to compile, I get 4 "You
canceled the previous operation" errors followed by a "module not found"
error. Compact and repair doesn't change it. Decompiling doesn' t change
it. Logging all the way out, even from TS and back in again doesn't change
it. If I try to open the form from the database window in either form view
or design view, nothing happens.

I've been forced (twice now) to go to a backup copy.

Anyone have any ideas what's going on??

John
 
I suspect its a bug, but it can also be fixed by using a different coding strategy. I started getting this error message (for no obvious reason) when I did ... If DCount("[field]","table","criteria")>1 Then...
in a forms OnDelete event procedure. Everything was fine up until I did that. The table was the table the form was bound to, and whether that made any difference I don't know.

So, after reading all the comments here, I recoded it by opening a recordsetclone of the form, doing a movelast, then a recordcount of the recordsetclone to see if there were more than 1 records satisfying the same "criteria" I had used in the DCount expression. Did exactly the same job, and no <swearword> error message.
 
Back
Top