Counting within a Query

M

mfranzen

I'm trying to create a query in which Access will count the number of "Yes"
or "No" answers based on a survey. Is there a way to do this?
 
J

John W. Vinson/MVP

I'm trying to create a query in which Access will count the number of "Yes"
or "No" answers based on a survey. Is there a way to do this?

Sure, but how you do it depends on your table structure (which we
cannot see).

Note that a Yes value is stored as -1, and No as 0; so you can use a
Totals Query to Sum a yes/no field to get either result:

NumberOfYes: Abs(Sum([yesnofield]))
NumberOfNo: Sum(1 + [yesnofield])
 
Top