How do I get a summary count of different individual values?

E

Eqrepro

I want to output a report that shows a summary count for individual values.
So, if my data looks like this:

Fred 31
Fred 23
Fred 10
Sam 43
Sam 21

I want my report to show:

Fred 3
Sam 2

I assume I need to put the summary field in the relevant section footer of
the report, but what exactly is the "=phrase" I need for the "control source"?

Thanks!
 
D

Duane Hookom

Apparently you have a "first name" footer that you want a count of the
records. Add a text box to the footer with a control source of:
=Count(*)

If all you want is the counts then create a totals query that groups by
First Name and counts First Name.
 
E

Eqrepro

I'm sorry... the question was explained incorrectly to me. The answer you
have given does indeed answer the question as posed, but apparently what they
were needing was not a straightforward count such as that. Now they have
explained it more detail, here is what was wanted... :)

If the data table has:

Fred 31
Fred 23
Fred 10
Sam 43
Sam 21
Joe 32
Rick 28
Sam 23

the output they want is:

Count = 4

In other words, a count of how many different names are represented, not a
count of the names themselves or the # of times they appear.

Thanks!

Eqrepro

-----------------------------------------------------------------------------------------------
 
D

Duane Hookom

One method is to create a group by query that groups by the first name. Then
add a text box to your report with a control source of:
=DCount("*","qgrpMyQuery")
 
Top