HI,
I have a few reports which I want to close when there is no data. I'm using this code;
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data in Report", vbInformation, "Report is cancelled"
Cancel = True
End Sub
Problem is that I have fields in the report such as the present date and the dates that the report covers. These are in the report header and page footer and will allways return data, and I'm sure they prevent the report closing.
Is there any way I can avoid this happening?
thx,
Franky
I have a few reports which I want to close when there is no data. I'm using this code;
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data in Report", vbInformation, "Report is cancelled"
Cancel = True
End Sub
Problem is that I have fields in the report such as the present date and the dates that the report covers. These are in the report header and page footer and will allways return data, and I'm sure they prevent the report closing.
Is there any way I can avoid this happening?
thx,
Franky