Wildcard in IIF Query

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

Guest

Would someone please tell me why this query is not working. It is not listing
the type of "L*" as Liquid or "O*" as Organic but rather listing them as
"Probably Solid." It is listing the "XX" as "Not Assigned" however. In other
words, everything is Probably Solid except for XX is Not Assigned. Thanks!
Jani

Expr1:
IIf([Package_Type]="L*","Liquid",IIf([Package_Type]="O*","Organic",IIf([package_type]="xx","Not Assigned","Probably Solid")))
 
Use the Like operator insead of = with the wildcards:
IIf([Package_Type] Like "L*", ...
 
Hi Jani - as soon as you put quotes around the * it no longer works as a
wildcard. look up IN()
 

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

Back
Top