Visibility of subreport

mounty76

Registered User.
Local time
Today, 11:24
Joined
Sep 14, 2017
Messages
345
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?

Code:
Dim nrecords As String

nrecords = DCount("*", "NewSuppliersforOffice")

If nrecords > 0 Then

Me.NewSuppliers.Visible = False

Else

Me.NewSuppliers.Visible = True

End If
 
So if you have new suppliers, you do not want to show them? 🤔
 
Haha! Ah this is for an invoice report that I send weekly for payments, any new suppliers I need to provide contact details for so that the office can verbally confirm wire instructions, I only need to send this contact information once when I enter a new supplier, I have put this as a subreport at the bottom of the weekly payment instruction. I have a Yes/No box in the supplier table to confirm if the contacts have been sent to the office, this is updated with a query once the report is sent (along with a Yes/No box in the expenses table to confirm that the invoice has been sent).

Not sure why in the report view it works but in the print preview it doesn't show the subreport at all?
 
I have seen mention of certain features that do not show in preview mode in other threads.

 

Users who are viewing this thread

Back
Top Bottom