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])
 

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