Private Sub Report_NoData(Cancel As Integer)
' Display a message if there are no receipts to be printed
' and don't preview or print report.
Dim strMsg As String, strTitle As String
Dim intStyle As Integer
strMsg = "There are no receipts to be printed."
intStyle = vbOKOnly
strTitle = "No Data"
MsgBox strMsg, intStyle, strTitle
Cancel = -1
End Sub