P
Proko
I am having a problem with the iif statement when I use it in the criteria
for a query for a combo box (Combo2) that is based on the selection of
another combo box (Combo1)
Essentially, what I am trying to do is show all choices in combo2 if there
has not been a selection in Combo1; And show a filtered selection in Combo2
if there is a selection in Combo1.
I am trying to do this using the iif statement when setting the criteria in
the Combo2 query.
iif (isnull(combo1), No Criteria is Set, Criteria is set)
I am having trouble with the "No Criteria is Set" part of the expression.
Leaving it blank, inserting Null or "" (zero length string" doesn't work.
Why am I doing this? Not only do I want to be able to make a selection in
Combo1 then a selection in Combo2 based on Combo1's selection but I want to
be able to do it the other way round. ie make a selection in Combo2 (so I
need all choices displayed) which will automatically make a selection in
Combo1.
I hope all this makes sense.
Is there a way? Or am I going about this the wrong way.
Any help would be greatly appreciated.
Thanks
for a query for a combo box (Combo2) that is based on the selection of
another combo box (Combo1)
Essentially, what I am trying to do is show all choices in combo2 if there
has not been a selection in Combo1; And show a filtered selection in Combo2
if there is a selection in Combo1.
I am trying to do this using the iif statement when setting the criteria in
the Combo2 query.
iif (isnull(combo1), No Criteria is Set, Criteria is set)
I am having trouble with the "No Criteria is Set" part of the expression.
Leaving it blank, inserting Null or "" (zero length string" doesn't work.
Why am I doing this? Not only do I want to be able to make a selection in
Combo1 then a selection in Combo2 based on Combo1's selection but I want to
be able to do it the other way round. ie make a selection in Combo2 (so I
need all choices displayed) which will automatically make a selection in
Combo1.
I hope all this makes sense.
Is there a way? Or am I going about this the wrong way.
Any help would be greatly appreciated.
Thanks