pdvsa
asked on
Sub Report and Display Text on No Data
Experts,
I have a subreport with a No Data event:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data"
Cancel = True
End Sub
The msgbox displays when I open the report separately but as expected the sub report msg box will not display when opening the Parent report and I do not want the msg box to display. Instead, I want the subreport to display text "No Data" so that it could be seen on the printout.
How can I do this? thank you
I have a subreport with a No Data event:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data"
Cancel = True
End Sub
The msgbox displays when I open the report separately but as expected the sub report msg box will not display when opening the Parent report and I do not want the msg box to display. Instead, I want the subreport to display text "No Data" so that it could be seen on the printout.
How can I do this? thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you. I put the code in the Footer Format event because this is where the subreport resides. I split points because both said the same but mbizup made it a bit easier with the codes.
=IIF([SubReport].[Report].
I think that's a little less obvious though then doing it in the subreport.
Jim.