R
Raymond & Lisa Yucha
I have a form with 3 controls (combo boxes). Each one of these controls is
passed back to a query based on what the user selects. The user may select
values from 1, 2 or all 3 controls (one control will have to be selected).
In my query design under criteria, if I simply place the referenced control
in the appropriate column Access looks for values from all 3 controls. This
becomes a problem when the user does not select all three controls. I know
I can use an if statement in the criteria of the query. So far this is what
I have. (All 3 criterias in the query would look similar to this).
iif([forms]![formname]![control1] is null, *,
[forms]![formname]![control1] )
This would take the control value for the criteria if there is one or return
all records if no control is selected. My problem is Access is choking on
the true scenario (the * case). Can someone help me with the syntax on how
to get Access to recognize the *. Thanks in advance.
Ray
passed back to a query based on what the user selects. The user may select
values from 1, 2 or all 3 controls (one control will have to be selected).
In my query design under criteria, if I simply place the referenced control
in the appropriate column Access looks for values from all 3 controls. This
becomes a problem when the user does not select all three controls. I know
I can use an if statement in the criteria of the query. So far this is what
I have. (All 3 criterias in the query would look similar to this).
iif([forms]![formname]![control1] is null, *,
[forms]![formname]![control1] )
This would take the control value for the criteria if there is one or return
all records if no control is selected. My problem is Access is choking on
the true scenario (the * case). Can someone help me with the syntax on how
to get Access to recognize the *. Thanks in advance.
Ray