Problem with No data

  • Thread starter Thread starter Ashley
  • Start date Start date
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
 
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
 
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
 
Back
Top