That didn't work. I put the string "Where FieldName = True" the Paid colum
and it's still returning everything. As it stands now I only have two Yes's
so it should only be returning just the two.
I find that the most reliable way to apply criteria to Yes/No fields is to
use..
= 0
(for false/no)
....and...
<> 0
(for true/yes)
This is especially true if you ever move your data to SQL Server because
while Access/Jet uses negative one for True, SQL Server bit fields use
positive one for True. By testing for zero all the time your queries would
not need to be redesigned.
That didn't work. I put the string "Where FieldName = True" the Paid colum
and it's still returning everything. As it stands now I only have two Yes's
so it should only be returning just the two.
You asked regarding your SQL statement. However, you appear to have
written that statement in the query QBE grid. That is not where it
goes.
If you write
True
as the criteria of the YesNo field grid, then look at the SQL it will
have written
Where YourTable.[YesNoField] = True
Note: True is a number value, not a string value. Do NOT surround True
with any quote marks.
I would also suggest using -1 instead of True. It is less ambiguous
than True or Yes, both of which equal -1.
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.