G
Guest
I'm sure this is simple but I'm missing it........
Hi
I have a subreport that is set to be invisible if it does not contain any
data. This had to be done because of another report that the sub is used on.
Anyway, how do I tell a main report to show a message box and cancel
printing if this particular subreport is not visible.
The code I have is as follows, but is not working:
Private Sub Report_Activate()
If (Me!rsubPumpsInStock.Visible = False) Then
MsgBox "No pumps in stock, cancelling report printing",
vbExclamation, ""
DoCmd.CancelEvent
End If
End Sub
I'm not sure which report event to use either.....
Thanks
CJ
Hi
I have a subreport that is set to be invisible if it does not contain any
data. This had to be done because of another report that the sub is used on.
Anyway, how do I tell a main report to show a message box and cancel
printing if this particular subreport is not visible.
The code I have is as follows, but is not working:
Private Sub Report_Activate()
If (Me!rsubPumpsInStock.Visible = False) Then
MsgBox "No pumps in stock, cancelling report printing",
vbExclamation, ""
DoCmd.CancelEvent
End If
End Sub
I'm not sure which report event to use either.....
Thanks
CJ