And function in Access queries

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".
 
D

Douglas J. Steele

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top