OpenReport action

M

Michelle

When clicking on an Access form button which opens a
report, I intermittently (but regularly) get the following
message:

"The OpenReport action was cancelled."

I suppose it is telling me that the OpenReport action
failed.
Is this true and what might be the cause?
How can I get a more detailed error message?
How can I prevent this from occurring?

Any thoughts on this subject would be appreciated.
Michelle
 
A

Allen Browne

Yes. Examples of how the message is triggered:
- the report's NoData event has cancelled the report;
- the user got tired of waiting, and cancelled the report;
- the report's Open event was cancelled;
- there was something wrong with the report so it could not open.

If you are using OpenReport in a macro, you are stuck with the message.

If you use the OpenReport action in VBA, use error handling to trap and
ignore Error 2501. More info on error handling:
http://allenbrowne.com/ser-23a.html
 

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