BarryMK
4 strings are enough
- Local time
- Today, 04:48
- Joined
- Oct 15, 2002
- Messages
- 1,349
I'm using the following code to fire a message box on no data for a report but can't get it to reopen the switchboard which is minimized after calling the report. I've tried placing the DoCmd in the three places shown in red but none of them work.
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo Err_Report_NoData
MsgBox "There are no current QA incidents. Cancelling Preview...", vbInformation, " No records found"
Cancel = True
DoCmd.OpenForm "Switchboard"
Exit_Report_NoData:
DoCmd.OpenForm "Switchboard"
Exit Sub
Err_Report_NoData:
MsgBox err.Description, , "Database service "
Resume Exit_Report_NoData
DoCmd.OpenForm "Switchboard"
End Sub
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo Err_Report_NoData
MsgBox "There are no current QA incidents. Cancelling Preview...", vbInformation, " No records found"
Cancel = True
DoCmd.OpenForm "Switchboard"
Exit_Report_NoData:
DoCmd.OpenForm "Switchboard"
Exit Sub
Err_Report_NoData:
MsgBox err.Description, , "Database service "
Resume Exit_Report_NoData
DoCmd.OpenForm "Switchboard"
End Sub