Is selected does not work on a Query

w1fini

Registered User.
Local time
Tomorrow, 03:35
Joined
Nov 4, 2009
Messages
19
Hi,

I have a table with a value that need to be checked via a checkbox(lets call it checkValue). The database saves this value as -1 if checked. (I have a SQL Server 2005 as Backend and the field is a bit)

If I run a query to show all the records that have been checked it works fine (checkValue=true)
But i can't get it to show me the unselected values (represented as 0 in the table). I tried checkValue = False and checkValue = 0. But I get an empty recordset back(But I know there a unselected records).

I even used the filter provided by access: Right click with the mouse and choose: is not selected

Any ideas on this?
 
Ok I found it out.

Just posting the solution in case someone else might have the same problem.

I have run the Query on the SQL Server and it shows the value as Null. Somehow Access does not show Null but 0. Strangely if I change the condition to checkValue = Null it worked like a charm and showed me all unchecked records.
 
You could have also done where checkvalue <> -1 as this will contend with triple state values. True, False, Blank (Null)

David
 

Users who are viewing this thread

Back
Top Bottom