Link to home
Start Free TrialLog in
Avatar of Biggles1
Biggles1Flag for United States of America

asked on

Access 2016 Action Queries behaving strangely

I have a table which includes a "Yes/No" field.  See attached.
Some of the records have their "Yes/No" Set to Yes.  See attached
I created a query that includes only :"Yes/No" set to "Yes"
The result is a dataset where ALL the "Yes/No" Fields are set to "Yes"

Has anyone encountered this phenomenon?
User generated imageUser generated imageUser generated image
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

-1 is True
0 is False
Looks like you have a select statement that correctly selects all the records where the value is true. What would you expect to be different?
Avatar of Biggles1

ASKER

The problem is that if you look at the table you will see that NOT all the values are true!  THAT's the problem
-1 is True
0 is False

I knew that.  It seems ACCESS does not know.  Because even through only SOME records are "-1" the query returns ALL the records even those that are NOT -1.
SOLUTION
Avatar of Anders Ebro (Microsoft MVP)
Anders Ebro (Microsoft MVP)
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The problem is that if you look at the table you will see that NOT all the values are true!  THAT's the problem
Nope, all values in your filtered query are -1, thus equal to True or Yes:

User generated image
p.s. in numbers
False => 0
True => NOT False
That means that any value not equal to the value of 0 (or 0.000) is interpreted as True.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys!  Quick response when I was in a real bind timewise!