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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF 2

Status
Not open for further replies.

kimchavis

Technical User
Jan 7, 2004
66
US
I was hoping someone could help me with this. Im using Access 2000 and I am new to Access. Im doing an iif statement within a query.

Expr6: IIf([expr5]=1,'Registered',IIf([expr5]=3,'Submitted'),iif([expr5] = 6,'LOI Executed')

of course this is coming back an error. it wasnt coming back an error until I added the last statement:
iif([expr5] = 6,'LOI Executed')

What did I do wrong in adding the last part?

Let me know if there is further information needed to solve this.

Thank you!!
 
And you have dropped the FALSE part of the last IFF

Code:
Expr6: IIf([expr5]=1,'Registered',
       IIf([expr5]=3,'Submitted',
       IIF([expr5]=6,'LOI Executed'[COLOR=red],'None of the Above'[/color])))
 
I think you should have the last part of the IIF statement.
ie: If the values are not the matching one then the text should show "SomethingElse"

Code:
Expr6: IIf([expr5]=1,'Registered',IIf([expr5]=3,'Submitted',iif([expr5] = 6,'LOI Executed'[b],'SomethingElse'[/b])))


________________________________________________________
Zameer Abdulla
Help to find Missing people
My father was a realistic father; not a vending machine dispense everything I demanded for!!
 
Golom,
Sorry we were typing at the same time. You succeeded ;-)

________________________________________________________
Zameer Abdulla
Help to find Missing people
My father was a realistic father; not a vending machine dispense everything I demanded for!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top