Solved

Compound boolean in IIF statement

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
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 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 …

791 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