Subject: Conditionally show a footer in access report
Posted By: trab Post Date: 8/15/2008 3:37:49 PM
Does anyone know if there is a way to conditionally show a footer in an Microsoft Access report.

For various reasons in my report I am trying to show a footer except for a certain instance in my data

 and because I need to show it in another part of the report I am unable to remove the data element via a change to my query.

Any help would be appreciated.

thank you.

Reply By: SerranoG Reply Date: 8/21/2008 10:12:19 AM
Do you mean that you want the footer to show on, say, pages 3 and 7 because there is a certain datum element present, but you don't want the footer to show for the rest of the pages?

I would make the footer always visible, then I'd put an invisible label in the page footer.

On the On Page Header's On Format event, I'd make the label invisible again.

In the detail's section's On Format event, I'd make label visible if the condition is met.  I would NOT write an ELSE statement to turn it off if the condition is not met.  You want the footer to show even if the condition was met once out of X times.

When the report loads, it hits the page header instructions to hide the label.  If the condition is met in the detail section, the label is turned on and will show in the page footer.  On the next page, the page header turns off the label again.  If the condition is not met, you won't see the label on that page... etc.



Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division

Go to topic 73488

Return to index page 1