Looking at multiple fields in a query

D

Dave

Access 2003

I am trying to create a query to show all people who have completed some
requirements.
The requirements are all check (yes/no) boxes.
So in the query I am putting "True" in the criteria for all requirements to
return the people who have completed everything..
Working fine
However: One requirement is not always required so there is another field
(check box) for Not Required.
(I think this should have initially be done as an option field but for now
this is what I am stuck with)

How can I have the query look at BOTH fields and include the record if
EITHER is true?

Thanks

dave
 
J

John Spencer

The SQL where clause would look like the following (note the parentheses
around the set of criteria that is joined with OR)

WHERE (Requirement1 = True or Requirement1_NotRequiredfield = True)
AND Requirement2 = True
AND Requirement3 = True
AND Requirement4 = True
....

If there is only the one, then enter criteria = true for all the fields
except not required field on one row of the criteria. In the second
criteria row enter true for all the fields except the one that is
optional (leave blank) and then under the NotRequired field enter true.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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