I have an invoice report with a group footer based on a "company name" grouping. Under some circumstances I want to print the report with this group footer hidden. How can I conditionally hide the group footer from within the calling VBA?
e.g. Here I want to show the footer:
DoCmd.OpenReport "CollectionInvoices", acViewPreview, , "Company = '" & _
Me.CompanyNameText & "' And InvoiceDate >= #" & Me.StartDateText & _
"# And InvoiceDate <= #" & Me.EndDateText & "#"
... and here I want to hide the footer:
DoCmd.OpenReport "CollectionInvoices", acViewPreview, , "InvoiceNo = '" & Me.InvoiceNo & "'"
The only way I can think to do this, is by using two different reports: one with the footer and the other without. Is there a better way?