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

IIF statement doesn't work.

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have the following IIF statement on the control source of an unbound text box on my report: IIf([Pay To Name]='',"NAME","PAY TO"). It always returns "PAY TO" never "NAME".
Anyone know why?
 
I think you quotation marks are not correct. For example:

= IIf([OrderAmount] > 1000, "Large", "Small")

In your situation, [pay to name] should be equal to what for "Name" to appear?

Fred
 
Try this:

IIf(Isnull([Pay To Name]),"NAME","PAY TO").
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top