Criteria Expression (repeat with corrected text)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top