Query Criteria: How to handle >9 "or" conditions?

  • Thread starter Thread starter Jimbo213
  • Start date Start date
J

Jimbo213

Using Access2003-SP2 with XP:

I have a form with 12 yes-no fields.
I'd like to build a report using a query to those 12 fields so that the
query qualifies any row where the OR condition is met.

For example:
YN01 = -1 or
YN02 = -1 or
YN03 = -1 or
....
YN12 = -1

The query builder stops at YN09 - apparently an Access limit.

In SQLView it shows the WHERE clause having 9 "or" conditions.

How can I get 12 conditions?
 
If you mean the design view stops at 9 lines of criteria, you can add more
criteria lines by selecting Insert Rows from the menu.

Alternative is
Field: YN01 + YN02 + YN03 ...+ YN12
Criteria: < 0

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
I "think" I understand.

1) how would I create a form that triggers this query. The form I created
had the 12 checkboxes. What would the form look like w/ your solution. I'm
not getting it - sorry for being so dense.

2) how would the query return all the rows where YN1 = -1 OR YN2 = -1 OR YN3
= -1? I want the query result to show [for instance] 15 rows meeting these
OR conditions, not just the value 3.
 
Back
Top