Checked box as Criteria

  • Thread starter Thread starter Lori Boekeloo
  • Start date Start date
L

Lori Boekeloo

I've read various solutions from this site, but none seem to work for me. I
am trying to run a query where every entry with a checked box shows up -
seems very simple. I've tried entering for the Criteria: -1, 1, Yes, yes,
y, Y, On, True

I have the Office Access 2007 program (first time using it). Previous years,
I've used Access 2000, and have never had a problem. Please help!
 
Lori, how is your table set up? Do you have lots of yes/no fields in your
table, and you want the query to return a row if *any* one or more of the
boxes are checked?

If so, you really need to change the data structure. For details, see:
Don't use Yes/No fields to store preferences
at:
http://allenbrowne.com/casu-23.html

If you want to proceed anyway, you could sum the yes/no fields. Since No is
zero, if the sum is non-zero, something it checked. To do that, you would
type an expression like this into the Field row in query design:
=[Basketball] + [Football] + [Baseball] + [Tennis]
using your yes/no field names instead of those 4.
Then in the Criteria row under this, enter:
<> 0
 
Back
Top