Query for Multiple Yes/No

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
 
D

Dejan

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')
 
J

John Vinson

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.
 

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