How to i count a record with muptiple yes no fields

N

New2bris31

i have various records. each record has a number of yes/no fields [approx
15]. i want to generate a or query that shows me even if one of the field has
a no that record is counted as one. two no's in same record still one. each
month i will generate the report showing the number of records which have a
no in the field.
 
S

Software-Matters

You could set up a new calculated field in your query, something like this:

YesNo: iif([YesNo1] = No OR [YesNo2] = No OR [YesNo3] = No etc etc ,1,0)

Then if any of the YesNo fields have a No a 1 will be place in the new
calculated field. you can then filter all records with a 1 to use as you wish.

Regards
JD
--
<a
href="http://www.software-matters.co.uk/bespoke-database-design.html">Bespoke
Access Database Development</a>
<p>Software Matters</br>
Straightforward solutions that work</p>
 
K

KARL DEWEY

Another way --
YesNo: IIF(Abs([YesNo1] + [YesNo2] + [YesNo3] + [No etc]) < X ,1,0)
-- X being the number of Yes/No fields.

Software-Matters said:
You could set up a new calculated field in your query, something like this:

YesNo: iif([YesNo1] = No OR [YesNo2] = No OR [YesNo3] = No etc etc ,1,0)

Then if any of the YesNo fields have a No a 1 will be place in the new
calculated field. you can then filter all records with a 1 to use as you wish.

Regards
JD
--
<a
href="http://www.software-matters.co.uk/bespoke-database-design.html">Bespoke
Access Database Development</a>
<p>Software Matters</br>
Straightforward solutions that work</p>


New2bris31 said:
i have various records. each record has a number of yes/no fields [approx
15]. i want to generate a or query that shows me even if one of the field has
a no that record is counted as one. two no's in same record still one. each
month i will generate the report showing the number of records which have a
no in the field.
 

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