C
Christopher W via AccessMonster.com
am trying to put a parameter in the SQL of a query to allow criteria from a
check box. Where the check box is selected it should only return data from
the query where the field = Yes. BUT when the check box is not selected i.e.
it is “no” the query should return all records whether the record is yes or
no. I initially though that I could do this by treating the blank check box
as though it was a Null variable. However clearly this is incorrect.
I have been trying the code like this;
AND ((([forms]![multi query]![checkbasket]= “yes”)=(select.([basket]) from
transaction where transaction.[Basket]= “yes”)) AND ((([forms]![multi query]!
[checkbasket] = “no”)=(select.([basket]) from transaction where transaction.
[Basket] = “no”or “yes”))
Any suggestions would be greatly appreciated, thanks in advance
check box. Where the check box is selected it should only return data from
the query where the field = Yes. BUT when the check box is not selected i.e.
it is “no” the query should return all records whether the record is yes or
no. I initially though that I could do this by treating the blank check box
as though it was a Null variable. However clearly this is incorrect.
I have been trying the code like this;
AND ((([forms]![multi query]![checkbasket]= “yes”)=(select.([basket]) from
transaction where transaction.[Basket]= “yes”)) AND ((([forms]![multi query]!
[checkbasket] = “no”)=(select.([basket]) from transaction where transaction.
[Basket] = “no”or “yes”))
Any suggestions would be greatly appreciated, thanks in advance