How do I count the number of times an entry occurs in a field?

G

Guest

I am looking for a way in Access 2002 to count the number of times specific
entries occur in a specific field. For example, if the field was
"Countries", and there were 3 entries for USA, 2 for Canada and 4 for Mexico,
what do I need to do (or other method) to return those values (ie. USA = 3,
Canada = 2, Mexico = 4)? I would then intend to use them in a graph on a
report. The answer is probably insanely easy, but I have only been an Access
user since last December, and I am on a very steep learning curve. Thanks.
 
G

Guest

HI,

Using your example, create a select query with the "Countries" field in the
design grid twice.

Click on the sigma icon in the toolbar (Query Design toolbar). This puts a
total line in the design grid.

Go to one of the "Countries" field in the design grid and in the total
line/box/cell use the down area to select Count.

The other "Countries" field should say "Group By" in the total line/box/cell.

Right click in the area next to the table and select "Properties". Change
the value of "Unique Values" from "no" to "Yes"

Run your query. This should work.

Andrew
 
G

Guest

Andrew,

Many thanks for the quick response. No way would I have figured that out on
my own. I will implement it and let you know how it goes.

Thanks again,

Howard
 

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