How to i count a record with muptiple yes no fields

  • Thread starter Thread starter New2bris31
  • Start date Start date
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.
 
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>
 
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.
 
Back
Top