M
Mac
Dear All,
I have a report that runs perfectly except if there is no data, I have
a piece of code in the No Data event:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There Are No cheques To Be Issued At This Time",
vbExclamation, "No Cheques To Raise"
Cancel = True
End Sub
The problem is that the report still runs some code I have for the On
Close event:
Update = MsgBox("Do You Wish To Record The Date Of The Cheque
Request", vbYesNo, "PCT Update Requestor")
If Update = vbYes Then
SetWarnings = False
DoCmd.OpenQuery "Cheque Request - PCT 10 Update",
acViewNormal, acEdit
DoCmd.OpenQuery "Cheque Request - PCT 75 Update",
acViewDesign, acEdit
SetWarnings = True
Else
Exit Sub
End If
End Sub
Is there a way to instruct the report to ignore the on close code if
there is no data?
Thanks in advance.
Andy
I have a report that runs perfectly except if there is no data, I have
a piece of code in the No Data event:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There Are No cheques To Be Issued At This Time",
vbExclamation, "No Cheques To Raise"
Cancel = True
End Sub
The problem is that the report still runs some code I have for the On
Close event:
Update = MsgBox("Do You Wish To Record The Date Of The Cheque
Request", vbYesNo, "PCT Update Requestor")
If Update = vbYes Then
SetWarnings = False
DoCmd.OpenQuery "Cheque Request - PCT 10 Update",
acViewNormal, acEdit
DoCmd.OpenQuery "Cheque Request - PCT 75 Update",
acViewDesign, acEdit
SetWarnings = True
Else
Exit Sub
End If
End Sub
Is there a way to instruct the report to ignore the on close code if
there is no data?
Thanks in advance.
Andy