C
Christopher W via AccessMonster.com
I am trying to get a query to search from a check box the problem is that a
check box cant be null it is either true or false. So what i whant it to do
is if the check bos is ticked, therefore TRUE. To check for records that are
true, However when it is not ticked i whant it to return all the records. I
have tried the following and riceve the error "At most one record can be
returned by the subquery". These three are basically exactly the same apart
from some small alterations "AND" to "OR" and instead of "-1 and 0" I split
it across two expressions; the last is just an nested IF statment that i
tryed and i got the same error again. But is there a better way to express it
that whant get the error?
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) AND (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0 or -1)))
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) AND (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0))) AND (([forms]!
[multi query]![check60]=0)=(select (basket) from transaction where
transaction.[Basket] = -1)))
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) OR (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0))) AND (([forms]!
[multi query]![check60]=0)=(select (basket) from transaction where
transaction.[Basket] = -1)))
IIF([forms]![multi query]![check60]=-1,-1,-1 OR 0)
check box cant be null it is either true or false. So what i whant it to do
is if the check bos is ticked, therefore TRUE. To check for records that are
true, However when it is not ticked i whant it to return all the records. I
have tried the following and riceve the error "At most one record can be
returned by the subquery". These three are basically exactly the same apart
from some small alterations "AND" to "OR" and instead of "-1 and 0" I split
it across two expressions; the last is just an nested IF statment that i
tryed and i got the same error again. But is there a better way to express it
that whant get the error?
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) AND (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0 or -1)))
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) AND (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0))) AND (([forms]!
[multi query]![check60]=0)=(select (basket) from transaction where
transaction.[Basket] = -1)))
(([forms]![multi query]![check60]=-1)=(select (basket) from transaction where
transaction.[Basket]= -1)) OR (([forms]![multi query]![check60]=0)=(select
(basket) from transaction where transaction.[Basket] = 0))) AND (([forms]!
[multi query]![check60]=0)=(select (basket) from transaction where
transaction.[Basket] = -1)))
IIF([forms]![multi query]![check60]=-1,-1,-1 OR 0)