Run-time error 2001

R

Rick

I've added a second module of VBA to a form which
includes a "DoCmd.OpenReport" line. When I try to run
the second module, I keep getting a "Run-time Error 2001 -
You cancelled the previous operation." message. When I
click on Debug, the "DoCmd.OpenReport" line is
highlighted.

I moved the module to a whole new form, and I still get
the same message, even though there are no
other "DoCmd.OpenReport" lines in the code behind this
form.

Any thoughts?

Rick Mitchell
Springville, CA
 
A

Allen Browne

Rick, break this down to see where there problem lies.

If you are using a WhereCondition in OpenReport, temporarily remove it. If
that solves the problem, then the problem is with the WhereCondition, so the
error message means, "When I tried to apply the WhereCondition it failed, so
I cancelled the previous operation (the opening of the report) as well."
 

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