Error 2001 You cancelled

94Sport5sp

Registered User.
Local time
Yesterday, 19:31
Joined
May 23, 2012
Messages
115
Hi:

I did something and now when I click on my (previously working) command button I get "Error 2001 You cancelled the previous operation" and my command does not run. So I figured "Easy fix close form do not save" but on reopen I get the same error message. Closed access and restarted with same message.

I have search here and Google and read different answers from, easy fix to corrupt database, but so far I have not cleared the error message.

Looking for ideas for a fix.

Thanks
 
Hi:

Just to add more information.

The problem seems to be with just one form and seems to be related to a permanent error code. The command button in question has an On Err statement in it. If I comment out the error then the code executes until the first DoCmd Dmax statement. If I comment out that statement then the code executes to completion.

So I changed the OnOpen for the form and added On Err (to execute first) statement (there is no code prior to this point) and the error triggers as soon as I open the form. So somehow I have set a permanent error on this form.

Looking for your words of wisdom.

Thanks
 
Hi:

I decided to delete the form (since it was only this form causing the problem) and recreated it. So far error message is gone.

Thanks for looking
 
this will be a spurious (unhelpful) error message

the form can't open because of some error

could be anything

- a problem with the forms query
- a duplicated or invalid sub in the form
- it manifests itself as error 2001

try opening the form's query, or the form directly, or compile the dbs, and you will get a better indication of the problem
 
That error message can also come up if you use a DLookup and no value is returned.
 
Hi Dave & Bob:

Since I deleted the form in question I cannot debug it further. Also my backup copy did not have the error and after I put my changes back in the error never returned.

After reading several responses on the net I came to the conclusion that this error seems to be a general catch all and simply means "You did something and you are on your own to fix it."

Thanks for your thoughts.
 
i don't think it's quite that.

may be you are opening a form in an app, with some error handling in it. there is an error, but access gives you a non-descript 2001 error rather than what is actually causing the problem.

if you leave the running app, and look at the query, or the form directly, you can then genrerally determine the real error.
 

Users who are viewing this thread

Back
Top Bottom