IIF Function

S

Suzanne

I need to use an If statement in a field in my query, here's what I need it
to do: If field name "PYE" equals "12/31" then insert "1/1" or If field name
"PYE" equals "11/31" then insert "12/1" or If field name "PYE" equals "10/31"
then insert "11/1".

So far I have this Exp: IIF([PYE]= "12/31", "1/1", "") it works for the
PYE's that are 12/31, but I can't figure out how to use the or part. Any
suggestions?
 
K

KARL DEWEY

Use nested IIFs like this ---
IIF([PYE]= "12/31", "1/1", IIF([PYE]= "10/31", "11/1", ""))
 

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