Filtering Checkboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

OK...this is probably a stupid question. However, here goes... I have a
table with a field called AUDIT, which has the Yes/No Checkbox as the data
type. I have a query were I need to filter either all the boxes that are
checked or all the boxes that are NOT checked. How do I do this? It seems
like it should be simple!
 
For checked boxes, the value is either True or -1 (they are equivalent). For
unchecked ones it is tricky: A checkbox value is Null until it is set; it is
False (or 0) if it has been set to "off." So for checkboxes the criteria for
checked ones should read True; the criteria for unchecked ones should read
False or Is Null if you want both the ones never touched and the ones that
have actually been set to be "off."
 
Thanks! That help!

K Dales said:
For checked boxes, the value is either True or -1 (they are equivalent). For
unchecked ones it is tricky: A checkbox value is Null until it is set; it is
False (or 0) if it has been set to "off." So for checkboxes the criteria for
checked ones should read True; the criteria for unchecked ones should read
False or Is Null if you want both the ones never touched and the ones that
have actually been set to be "off."
 
Pardon me.

If a field (in Jet databases) is defined as a boolean field (Yes/No) then it
is never null. It is always Zero or -1.

I've tested setting a yes/no field to null. Access just sets the field to
false.
 
Back
Top