Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress a section

Status
Not open for further replies.

BigLouie

Technical User
Dec 1, 2005
876
US
Have a report in which the first group is by Branch, the second group is by Salesperson, the third group is by Customer and the last group is by Product Categories. The totals include sales this year and sales for last year. Some items and customers will have zero (0) sales for this year and last. I need to be able to suppress the header and footer of items and customers if their totals are zero. How can I do that?
 
You can create totals in the header and footer sections and give them names like:
txtCustHeadTotal
or
txtCustFootTotal

You can then add code to the On Format event of these sections like:
Code:
Cancel = (Me.txtCustHeadTotal = 0)
or
Code:
Cancel = (Me.txtCustFootTotal = 0)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top