Wildcard in IIF Query

J

Jani

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")))
 
A

Allen Browne

Use the Like operator insead of = with the wildcards:
IIf([Package_Type] Like "L*", ...
 
K

Kernow Girl

Hi Jani - as soon as you put quotes around the * it no longer works as a
wildcard. look up IN()
 
Top