Query showing YES counts for different fields

joe789

Registered User.
Local time
Today, 21:40
Joined
Mar 22, 2001
Messages
154
Hi Folks,

Any help or advice regarding this problem would be greatly apprciated:

I am focusing on several check-mark box style fields in a table (I have about 13 seperate check-mark box fields). I am trying to create a query that lists how many "YES" answers are in each check-mark box for the table. If possible, instead of creating seperate queries for all 13 of the check-mark boxes, I would like to create one query which lists the number of "YES" check-marks for each one of the 13 fields. Is there anyway to do this?

I know that I can create seperate queries for each one of the queries and use an aggregate query with count function to generate the number of records with a "YES" in the field. However, if I could possibly find a way to show all the fields and just show total "YES" for each one of the fields it would be a lot easier. By the way, each unique record may have between 0 and all 13 check-mark boxes with a "YES" answer.

Thank you very much,

Joe
 
Since the True value is -1, you can Sum() the checkboxes.

Select Abs(Sum(Chk1)) As CountChk1, Abs(Sum(Chk2)) As CountChk2, etc.

I used the Abs() function to convert the result to an absolute value.
 

Users who are viewing this thread

Back
Top Bottom