Count Multiple Fields

Mickster

Registered User.
Local time
Yesterday, 21:18
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
 
Mickster said:
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

Your Field has either True or False, why do you have to count per field... There is only one count per field..

You can put the iif(field1 = true, 1, 0) then at the summary page, you can summarize the above values...
 
Yes or True is stored as -1. No or False is stored as 0. So all you need to do is sum the Yes/No field and change the sign and you have the number of yes answers.
 

Users who are viewing this thread

Back
Top Bottom