nested iif statements

skied97

New member
Local time
Today, 15:01
Joined
Jun 1, 2007
Messages
1
This should should be straightforward but i cannot get the expression to work.

I enter a number of days into a field called DAYS and want to use this number to look up a table of descriptions with the selected description populating a field called PAYMENT TERMS.

I have entered the following expression into the text field called PAYMENT TERMS

=iif([days]=0,"terms are payment on completion",iif([days]=7,"terms are 7 days from date on invoice",iif([days]=14,"terms are 14 days from invoice","invalid number of days")))

I keep getting [#name? in the PAYMENT TERMS FIELD.

What am I doing wrong?
 
1st problem ... posted in wrong forum ...

Other than that, I see nothing wrong. It works for me. Ensure that the name of the field is truly DAYS.
 
Make sure that days is also not the name of the text box, if so rename the text box to txtdays and when saving, due to autocorrect, it will likely rename your field in the IIf statement so rename it back to days.
 

Users who are viewing this thread

Back
Top Bottom