Query for Multiple Yes/No

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I have a table that has 3 Yes/No fields.

I want to create a query that will tell if any of those fields are No. So
if a student is Yes, Yes, No, or any other combination that includes a no,
they will be displayed. The only students I want excluded from the list
are those that are Yes, Yes, Yes. How do I design a query to do this?

Greg
The always access confused
 
If yout fields are of yes/no type then do the following:
SELECT * FROM tblYourTable
WHERE NOT (Field1=0 AND Field2=0 AND Field3=0)

If your fields are of 'text' type this should do:
SELECT * FROM tblYourTable
WHERE NOT (Field1='Yes' AND Field2='Yes' AND Field3='Yes')
 
I have a table that has 3 Yes/No fields.

I want to create a query that will tell if any of those fields are No. So
if a student is Yes, Yes, No, or any other combination that includes a no,
they will be displayed. The only students I want excluded from the list
are those that are Yes, Yes, Yes. How do I design a query to do this?

Greg
The always access confused

WHERE Field1 = No OR Field2 = No OR Field3 = No

On the query grid, just put No on *three separate rows* in the
Criteria under the respective fields.
 
Back
Top