Link to home
Start Free TrialLog in
Avatar of leezac
leezac

asked on

IIf statement not showing correctly

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.
ASKER CERTIFIED SOLUTION
Avatar of HomerTNachoCheese
HomerTNachoCheese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HomerTNachoCheese
HomerTNachoCheese

or Expr: IIf([tran code] in("BUY","RBUY"),"Rule 2 Purch","Rule 2 Sales")
Avatar of leezac

ASKER

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.