Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need something to replace OR statement

Status
Not open for further replies.

cassie901

Technical User
Nov 20, 2006
3
US
Hi,

I need something to replace the OR in an IIF statement.

In otherwords, how can I simplify a statement such as

IIF(([state]= 'CA' or [state] = 'NY' or [state] = 'FL'),'big','small'). I suspect there is someway to use the in('CA','NY','FL') function but I haven't figured it out.

Thanks.
 
Forgot to mention: I'm referring to MS Access.

Thank you.
 
In a query or a ControlSource, but not in VBA:
IIf([state] In ('CA','NY','FL'), 'big', 'small')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top