>Im trying to set up a report that will print out another report only when the
>first report is blank.
[quoted text clipped - 4 lines]
>
>What is the best way to get this to work?
Open the 2nd report from the form command button's error
handler (error 2501). Here's the general idea:
On Error GoTo CatchErrors
DoCmd.OpenReport "report1", . . .
ExitHere:
Exit Sub
CatchErrors:
Select Case Err.Number
Case 2501
DoCmd.OpenReport "report2", . . .
Case Else
MsgBox Err.Number & " - " & Err.Description
End Select
Resume ExitHere
End Sub

Signature
Marsh
MVP [MS Access]
Donnie Ashley - 05 Apr 2007 13:02 GMT
I did not post the question.... however, it is the perfect solution to my
similar problem and I learned about about using Err.Number. Thanks for the
help!
-Donnie
> >Im trying to set up a report that will print out another report only when the
> >first report is blank.
[quoted text clipped - 23 lines]
> Resume ExitHere
> End Sub