Error 2001 You Canceled the previous operation

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
 
H

Hoop

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.
 

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