Run-time error 2001

  • Thread starter Thread starter Rick
  • Start date Start date
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
 
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."
 
Back
Top