You cancelled the previous operation

L

Laurel

Sometimes a running database seems to get corrupted, as if it captured a
user error and it would stick forever. For instance, the production copy of
my database began producing this error when a particular form is opened. It
cleared up when I sent a fresh copy to the user. The actual datafiles are
in a back end database, so nothing should be changing. They run with the
/runtime switch, so shouldn't be able to explicity change things.

I've had similar experiences. Can't remember enough to describe the details
reliably now, but attributes get "stuck" in the form - I think dynamic
select criteria, etc.

Anyway, my current error is not real helpful for figuring out how to
bullet-proof my database against this kind of corruption:

"Microsoft Access

There was an error executing the command.You cancelled the previous
operation."

tia
laurel
 
V

Van T. Dinh

Generally, this means one part of the code trying to open something which is
subsequently cancelled. In this case the first part of the code returns the
above error.

For example, you may have a CommandButton on a Form to open a Report. In
the Report, you can use the Report_NoData Event to cancelled the opening.
In this case, the first code (CommandButton_Click Event) will return the
error if the Report_NoData Event is activated.

To avoid this problem (error no 2501, I think), you need to trap & ignore
the error no. 2501.
 

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