You can count the Boolean (Yes/No) fields which are True (Yes) by summing an
expression using the IIf function to return 1 or 0. In the report footer put
text boxes for each fieled with a ControlSource such as:
=Sum(IIf([FieldName],1,0))
where FieldName is the name of the Boolean field in question.
You might see it recommended in some books that you use an expression such as:
=Sum(Abs([FieldName]))
or:
=Sum([FieldName] * -1)
Ignore this advice! It relies on the implementation in Access of Boolean
value as -1 (True) and 0 (False). Relying on the implementation is bad
programming practice.
Ken Sheridan
Stafford, England
Joan said:
I have several fields that have yes/no and would like to run a report
that shows just the total of "yes" for each field. Some of the records
have yes in more than one field. Any suggestions?