C
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:
If (Reports!rsubPumpsInStock.Visible = False) Then
MsgBox "No pumps in stock, cancelling report printing",
vbExclamation, ""
DoCmd.CancelEvent
End If
I'm not sure which report event to use either.....
Thanks
CJ
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:
If (Reports!rsubPumpsInStock.Visible = False) Then
MsgBox "No pumps in stock, cancelling report printing",
vbExclamation, ""
DoCmd.CancelEvent
End If
I'm not sure which report event to use either.....
Thanks
CJ