Counting

  • Thread starter Thread starter Sue Sweet
  • Start date Start date
S

Sue Sweet

I know this simple but I have a query. The query has 2 fields: 3-digit zip
& Zip
I want 2 things. I want to count the number of records in each 3-digit zip
and also how many of each zip code.

So I want to see

970 16 records
97011 5 records
97012 3 records
97013 1 records
97014 5 records
97015 2 records

Thanks in advance. I know this is simple, but I just can't think today :)


Sue
 
Sue said:
I know this simple but I have a query. The query has 2 fields: 3-digit zip
& Zip
I want 2 things. I want to count the number of records in each 3-digit zip
and also how many of each zip code.

So I want to see

970 16 records
97011 5 records
97012 3 records
97013 1 records
97014 5 records
97015 2 records


The 3 digit zip isn't really needed so you can remove it
from the query.

Use the report's Sorting and Grouping window (View menu) to
create a group with header on the expression:
=Left(Zip,3)
Add a text box to this header using the expression:
=Left(Zip,3)
Add another text box with the expression:
=Count(*) & " records"

Add another group (under the previous one) with header using
the Zip field.
Add a text box to this header and bind it to the Zip field.
Add a second text box using the expression:
=Count(*) & " records"

Leave the detail section empty and set its height to 0 (or
make it invisible).
 
Back
Top