I have a query with two tables. I want the query to return data from the
first table. The second table holds a checkbox. The two tables are linked
together by an AutoNumber. If the AutoNumber has the checkbox selected in
the second table I do not want the data returned. I only want the data from
the first table if the check box is not selected.
Usually I would try Is Null, but that does not seem to work with checkboxes.
Anyone have Criteria that I can put in the for the Check box criteia?
Dirk Goldgar - 15 Nov 2006 18:48 GMT
> I have a query with two tables. I want the query to return data from
> the first table. The second table holds a checkbox. The two tables
[quoted text clipped - 5 lines]
> checkboxes. Anyone have Criteria that I can put in the for the Check
> box criteia?
Boolean ("Yes/No") fields can never be Null in a table -- they are
always either True (-1) or False (0). You want to use a criterion of
either
False
or
0
Either of those would do; you don't need to specify both as
alternatives.
In a query that performs an Outer Join between two tables, if there's no
matching record on one side, then it is possible for the query to return
a Null for the boolean field. If that's what you have, you should
specify "Is Null" and an alternate criterion for the field, as well as
"False".

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Klatuu - 15 Nov 2006 18:56 GMT
A checkbox, like a Yes/No data type, holds only two values, 0 and -1.
0 = False and -1 = True
The value of a check box that displays as checked is True and if not checked
it is False.
(For those of you out there who will tell me what is wrong with the
statement above, kindly SHUT UP! I' trying to keep this simple for a newbie.
- Have a wonderful day :)
> I have a query with two tables. I want the query to return data from the
> first table. The second table holds a checkbox. The two tables are linked
[quoted text clipped - 3 lines]
> Usually I would try Is Null, but that does not seem to work with checkboxes.
> Anyone have Criteria that I can put in the for the Check box criteia?