Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Compound boolean in IIF statement

Posted on 2011-03-02
3
Medium Priority
?
827 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:cquinn
ID: 35023288
iif (InStr("ABC",[Field1]) > 0, dotrue, dofalse)
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

715 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