Solved

Compound boolean in IIF statement

Posted on 2011-03-02
3
774 Views
Last Modified: 2012-05-11
I need an expression that utilizes the IIF statement where the condition is a compound OR.  For instance. I realize I could next the IIF statements but wanted to avoid that.

IIF( Field1 = "A" OR "B" OR "C", dotrue, dofalse).

0
Comment
Question by:StevenPMoffat
3 Comments
 
LVL 15

Expert Comment

by:cquinn
Comment Utility
iif (InStr("ABC",[Field1]) > 0, dotrue, dofalse)
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 50 total points
Comment Utility
You can also do:

Iif(field1 in ("A","B","C"), "yes", "no")
0
 

Author Closing Comment

by:StevenPMoffat
Comment Utility
Thanks for the quick response.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now