Running Totals Based Upon String Value

access_viper

Registered User.
Local time
Today, 12:57
Joined
Mar 7, 2008
Messages
15
Hello.

I have a report that I would like to auto-calculate the total number of instances in which a string value is selected. I have the following string values available from a drop-down list:

Below
Average
Above

I would like the report to have the total number of of Below(s), Average(s), and Above(s) at the end of the report.

I have tried using Sum and DSum without any success. Should I have a lookup for each string value that correlates to a number (integer) value, and then perform the running totals?

Any help is appreciated.
 
For each put a text box in the footer of the report (report footer, not page footer) and then set the controlsource to this:

=Sum(IIf([YourField]="Below",1,0))

=Sum(IIf([YourField]="Average",1,0))

=Sum(IIf([YourField]="Above",1,0))


As long as you change YourField to the actual name of your field, then putting each one of these in a different text box's controlsource should do it for you.
 
The iif statement in the control source worked like a champ. Thank you very much.

Side note, how long have you been using Access?


Thanks, again.
 
The iif statement in the control source worked like a champ. Thank you very much.
GladWeCouldHelp.png


Side note, how long have you been using Access?

11 years (since 1997 and Access 2.0)
 

Users who are viewing this thread

Back
Top Bottom