And function in Access queries

  • Thread starter Thread starter skline
  • Start date Start date
S

skline

I am having trouble adding a simple "and" statement in
Access 2000? Is the syntax different than Excel? I am
using it in an "if" statement and know that if in Access
is "IIF".
 
Yes, Access is different than Excel in this regard.

Rather than

If(And(Cond1, Cond2), Value_If_True, Value_If_False)

it's

IIf(Cond1 And Cond2, Value_If_True, Value_If_False)
 
Back
Top