Count Multiple Fields

Mickster

Registered User.
Local time
Yesterday, 21:02
Joined
Feb 10, 2005
Messages
38
hi there,

I have been struggling over this the past few days and get no where. I am trying to count the number of times Yes appears in a few fields. This is what I have right now in design view:

Field1YesCount: Count(IIF([Field1] = True,1,0))

Field2YesCount: Count(IIF([Field2] = True,1,0))

Field3YesCount: Count(IIF([Field3] = True,1,0))

This doesnt seem to work, could someone please help.

Thanks
 
Code:
Field1YesCount: -1*Sum([Field1])

Et cetera.

RV
 
Thanks a lot that worked!!! The help is much appreciated.....if you dont mind so could you please explain the syntax.
 
Mickster said:
Thanks a lot that worked!!! The help is much appreciated.....if you dont mind so could you please explain the syntax.

Sure, no prob.
Yes = -1, No = 0.
So by summing all values you'll get -1 multiplied by the number of times you ticked "yes".
Multiplying the sum hence results in the requested total.

RV
 

Users who are viewing this thread

Back
Top Bottom