Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nested IIF statement

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
I have a report with a text box that needs to be populated with a number of different possibilities depending on the content of two other text boxes.
For example if text1 = 1 and text2 = 2 then I need text3=22, but if text1=2 and text2=2 text3 must equal 35.
What is the format for nested iif statements?, I can't seem to get it to work.
Thanks

Steph
 
Steph,

IIF([text1]=1 And [text2]=2,22,IIF([text1]=2 And [text2]=2,35,""))

This is one I have used before:
=IIf([Number]=1 Or [Number]=2 Or [Number]=3,"Yes","No")

Hope it helps :)

Aubs
 
Thanks, that's great, I've got that working now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top