Counting

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
 
M

Marshall Barton

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).
 

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