Hi All,
I have the below code in the 'on format' event of a report footer, idea is to hide a subreport should nrecords>0, it works fine when I open the report and does everything expected, however when I print preview the report the subreport is missing when it should be there and it shows in the report?? Any ideas?
I have the below code in the 'on format' event of a report footer, idea is to hide a subreport should nrecords>0, it works fine when I open the report and does everything expected, however when I print preview the report the subreport is missing when it should be there and it shows in the report?? Any ideas?
Code:
Dim nrecords As String
nrecords = DCount("*", "NewSuppliersforOffice")
If nrecords > 0 Then
Me.NewSuppliers.Visible = False
Else
Me.NewSuppliers.Visible = True
End If