D
Dan @BCBS
I am trying to add a message when there are no records to return for a report.
This is what I have added to the reports event but I still get a blank
report with no message box...
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo ErrHandler
MsgBox "Sorry. There are no records" & vbCrLf & vbCrLf & _
"to display for this report.", vbInformation + vbOKOnly, _
" No Records"
Cancel = True
Exit Sub
ErrHandler:
MsgBox "Error in Report_NoData( )" & vbCrLf & _
"in " & Me.ICNSR & " f_TrackingData " & vbCrLf & vbCrLf & _
Err.Number & vbCrLf & Err.Description
End If
End Sub
This is what I have added to the reports event but I still get a blank
report with no message box...
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo ErrHandler
MsgBox "Sorry. There are no records" & vbCrLf & vbCrLf & _
"to display for this report.", vbInformation + vbOKOnly, _
" No Records"
Cancel = True
Exit Sub
ErrHandler:
MsgBox "Error in Report_NoData( )" & vbCrLf & _
"in " & Me.ICNSR & " f_TrackingData " & vbCrLf & vbCrLf & _
Err.Number & vbCrLf & Err.Description
End If
End Sub