Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Compound boolean in IIF statement

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
StevenPMoffat
Asked:
StevenPMoffat
1 Solution
 
cquinnCommented:
iif (InStr("ABC",[Field1]) > 0, dotrue, dofalse)
0
 
Patrick MatthewsCommented:
You can also do:

Iif(field1 in ("A","B","C"), "yes", "no")
0
 
StevenPMoffatAuthor Commented:
Thanks for the quick response.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now