D
Damon Heron
First let me start by saying I googled this question, which is probably a
common one, and tried everything without success.
When I open a report with no data from my form "frmAllReports" it goes to
the report open and cancels on no data. Fine so far. Then when it returns
I get the error msg. Here is my form code:
Public Sub cmdReports_Click()
On Error GoTo Err_cmdReports_Click
On Error Resume Next 'I added this on the advice of someone in newsgroup -
no help
DoCmd.OpenReport stDocName, acPreview 'stDocName is a public variable
that works fine unless no data
Exit_cmdReports_Click:
Exit Sub
Err_cmdReports_Click:
If Err.Number = 2501 Then Resume ExitHere
MsgBox "Error Number: " & Err.Number & vbCrLf & Err.Description
Resume ExitHere
End Sub
Nothing has changed with Access - it is on a single pc and the db is still
in development. Any ideas??
common one, and tried everything without success.
When I open a report with no data from my form "frmAllReports" it goes to
the report open and cancels on no data. Fine so far. Then when it returns
I get the error msg. Here is my form code:
Public Sub cmdReports_Click()
On Error GoTo Err_cmdReports_Click
On Error Resume Next 'I added this on the advice of someone in newsgroup -
no help
DoCmd.OpenReport stDocName, acPreview 'stDocName is a public variable
that works fine unless no data
Exit_cmdReports_Click:
Exit Sub
Err_cmdReports_Click:
If Err.Number = 2501 Then Resume ExitHere
MsgBox "Error Number: " & Err.Number & vbCrLf & Err.Description
Resume ExitHere
End Sub
Nothing has changed with Access - it is on a single pc and the db is still
in development. Any ideas??