Count several different text fields in a report

G

Guest

Hi:

I have a problem trying to count the total number of text fields in my
report. I've tried Sum and Count without success.

Report Heade
---------------------------------------------------------------------------------
Person's Name, Office, Tel, Fax

Total number of items in their work area (######)

Group Header
----------------------------------------------------------------------------------
Work Area

Detai
----------------------------------------------------------------------------------
=iif([item1]="sometext", "Yes", "No")
"
"
=iif([itemN]="sometext", "Yes", "No")

Detail footer
Group footer
=Count([item1]) returns correct number of item1 etc etc

Report Footer

I'd like to be able to place the total number of items for all the rooms a
person works in.

I hope the question is clear. let me know and I'll try and clairfy it.

Joe
 
D

Duane Hookom

Try:
=Sum(Abs([item1]="sometext"))

[item1]="sometext" will return either -1 or 0 for True or False. Summing the
absolute value will count the trues.
 

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