Problem with No data

A

Ashley

I have a form open a report that has query as a record
source.
I want to handle no data event.
I use report no data event. It works fine canceling the
report except when it goes back to my form I got run time
error: The OpenReport action was canceled.
I would like to cancel report if no data and open the
Switchboard form.

Ashley
 
D

Duane Hookom

Capture the error in the calling routine.

On Error GoTo errHander
'
'
Exit_ThisCode:
Exit Sub

errHandler:
Select Case Err
Case 2501
Resume Exit_ThisCode
Case Else
'
End Select
End Sub
 
G

Guest

I tried that and still after Exit Sub I get the following message:
"Run-Time error '2501':
The OpenReport action was canceled."

And I can choose "End" or "Debug".

How can I avoid this message?

Thank,
Liat
 

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

Similar Threads


Top