Suppress Data if Sum = 0

R

Rick Munroe

I have a report where I am looking for errors.
If the sum of several records = 0 then everything is OK.
How do I supress the header, data and footer from showing for these records?
I've been away from Access for several years, please be specific.
Thanks for your help,
Rick
 
A

Allen Browne

The simplest way to suppress the data from the report is to eliminate it
from the source query. To do that means creating a Totals query or subquery
that gives you the total in the original report. You can then use critieria
in the query to eliminate these records.

1. Create a query, and depress the Total icon on the toolbar in query
design.
Access adds a Total row to the query design grid.

2. In the Total row, accept GROUP BY under those fields that define the
total, and SUM under the filed that actually gives you the total. Remove any
unnecessary fields. In the Criteria row under the total, enter:
Is Null OR <> 0

3. Save that query. Now either:
a) Use it as an input "table" for another query that gives you all the
fields you need for your report, or
b) Use it as the source for your main report, and use a subreport to give
you the details.
 
R

Rick Munroe

Allen,
This got me started in the right direction.
I need to do some massaging of the queries to get it totally right.
Your help is greatly appreciated - especially on a Sunday night.
Thanks,
Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top