Solved

Compound boolean in IIF statement

Posted on 2011-03-02
3
817 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 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

728 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