If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: how to count multiple fileds in access

my query is
i have a database which have four columns and in each column there is value "Yes" or "No". i want to calculate all the "yes" from all the fields and similarly all the "No" for a perticular name.

Field name:
name Good Very good Poor

satpal yes yes No
Partap No No Yes
Parminder Yes yes no
Satpal yes No No

actually m working wt MS Access 2002
i am giving you some more detail regarding the query

there is a questionaire containig six questions each question will be marked Yes or No. i want to implemented it on a certen set of teachers regarding their feed back by the students based on these six question. i want to calculate total no. of Yes and no at once for six question for one teachers

i want to get a query will calculate total yes and no of perticular teacher
say in this example Navdeep is Having 2 Yes and 2 No the same way this is condition with one record. there is posibility of multiple records with same name. how to calculate that as there is satpal in above example

ypu coudl do this with an IIF
eg
SELECT class,
COUNT(IIF(Q1=TRUE,1,0) as Q1Yes,
COUNT(IIF(Q2=TRUE,1,0) as Q2Yes,
COUNT(IIF(Q3=TRUE,1,0) as Q3Yes,
COUNT(IIF(Q4=TRUE,1,0) as Q4Yes,
COUNT(Q1) as NoRepsonses
FROM mytable
GROUP BY class