PC Review


Reply
Thread Tools Rate Thread

Cancel = True - error

 
 
PayeDoc
Guest
Posts: n/a
 
      9th Mar 2010
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


 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      9th Mar 2010
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

PayeDoc wrote:
> 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
>
>

 
Reply With Quote
 
PayeDoc
Guest
Posts: n/a
 
      11th Mar 2010
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


"John Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> PayeDoc wrote:
> > 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
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancel = True Sam Kuo Microsoft Excel Programming 4 12th Jun 2008 01:03 AM
CancelEventArgs.Cancel - How Event Raising Code Know if Client Set .Cancel=true Smithers Microsoft C# .NET 3 24th Sep 2007 02:30 AM
Cancel = True Stapes Microsoft Access 1 18th Jul 2007 04:45 PM
Cancel = true Stapes Microsoft Access 0 18th Jul 2007 04:30 PM
Cancel = True =?Utf-8?B?SnVzdEJyZWF0aGU=?= Microsoft Excel Programming 4 9th Apr 2007 04:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 AM.