Count and DCount in Reports

  • Thread starter Thread starter tom
  • Start date Start date
T

tom

Hi i was hoping someone could give me a brief explanation, or point me at a
tutorial that explains how the Count and DCount functions work. I have a
report with 4 different groups of people on it. Im trying to make a text box
for each group that counts the number of records in the group. Then
calculate the size of the group as a percentage of the total amount of
records.

any help / links would be appreciated

Tom
 
Assuming your groups of people are by hair color "Red", "Brown", "Black",
and "Blonde". You can count each of these groups in a report or group footer
with text boxes with control sources like:
=Sum(Abs([HairColor]="Red"))
=Sum(Abs([HairColor]="Brown"))
=Sum(Abs([HairColor]="Black"))
=Sum(Abs([HairColor]="Blonde"))
TO get the percent red heads:
=Sum(Abs([HairColor]="Red"))/Count(*)
 
Back
Top