IIf statement not showing correctly

leezac used Ask the Experts™
This should be relatively simple..  

If Tran Code = "BUY" or "RBUY then Rule 2 Purch else Rule 2 sales.

or can it be done this way to use "or"?

Expr: IIf([tran code]="BUY" Or "RBUY","Rule 2 Purch","Rule 2 Sales")

Thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Expr: IIf([tran code]="BUY" Or [tran code]="RBUY","Rule 2 Purch","Rule 2 Sales")
or Expr: IIf([tran code] in("BUY","RBUY"),"Rule 2 Purch","Rule 2 Sales")


Thank you!!!
No problem!  I have read somewhere that using the in( ) function rather than using Or is somehow more efficient when running queries, but I have never noticed a difference.  Maybe at least it requires less typing when you would have otherwise had to use Or multiple times.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial