Criteria Expression (repeat with corrected text)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

NOTE: for some reason the text was messed up in my original
post; will try again:

I am attempting to do an expression correctly for the
Criteria line of a query.

For a particular field [Status] in the query I want it to
be based on a form which the user has open and to be equal
to the choice made in a combo box, EXCEPT if the use picks
"(Any)" as a choice from the combo box, in which case I
don’t want the field to be filtered on.

I thought something along the lines of the following would
work, but it doesn’t:

IIf([Forms]![ClassMailLabelPick]![Combo125]="(Any)","",
[Forms]![ClassMailLabelPick]![Combo125])

Anybody got any ideas on how this should be written so that
if the user picks the (Any) choice from the drop-down, the
[Status] field criteria line will not have anything in it,
but if the use picks any of the other choices that text
will be used as a criteria??

Thanks,

Steve
 
Back
Top