Cancel = True - error

P

PayeDoc

Hello All

I have a number of reports where I have set the OnNoData event to Cancel =
True. This works fine where the user attempts to open one of the report
usign a button created with the wizard for that purpose, but if they click a
button where the OnClick event includes lots of DoCmd OpenReport commands,
when the code reaches a report with no data they get a message that the
OpenReport was cancelled - and the code stops.

What do I do?
Hope someone can help

Many thanks
Leslie Isaacs
 
J

John Spencer

Do you have error handling in your code? IF so, does it use Resume Next?

We can't see the code you are using unless you post it and therefore it is
difficult to make suggestions to overcome the problem.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
P

PayeDoc

John

Many thanks for your reply - and apologies for the delay in my responding, I
had to be away unexpectedly.

I didn't have error handling, but now I do!!
I suddenly remembered that this was about handling error 2501, which I have
now done.

Thanks again
Les
 

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