Solved

Compound boolean in IIF statement

Posted on 2011-03-02
3
796 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
ID: 35023288
iif (InStr("ABC",[Field1]) > 0, dotrue, dofalse)
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 50 total points
ID: 35023428
You can also do:

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

Author Closing Comment

by:StevenPMoffat
ID: 35023520
Thanks for the quick response.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get number of Files in Directory and Sub Directories 2 42
Access Changing Number to Date with Seperator 5 21
TSQL query to generate xml 4 36
Help with DoEvents 8 28
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 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