IIf Condition

  • Thread starter Thread starter DW
  • Start date Start date
D

DW

I am trying to use an IIF statement as a control source for a textbox, I
used

=IIf([at2] Like "PL1*",[PL1] & [po],IIf([at2] Like "PL2*",[PL2] & [po],[at2]
& [po]))

and got the error "NAME?"

at2 is a textbox which might have any thing in it I am trying to
differentiate a few records, namely PL1 or PL2.
After those 3 letters and 1 number maybe a space or not, so I was trying to
use a wildcard of *.
Any ideals of what I might be doing wrong?
Thanks!
DW
 
I am trying to use an IIF statement as a control source for a textbox, I
used

=IIf([at2] Like "PL1*",[PL1] & [po],IIf([at2] Like "PL2*",[PL2] & [po],[at2]
& [po]))

and got the error "NAME?"

at2 is a textbox which might have any thing in it I am trying to
differentiate a few records, namely PL1 or PL2.
After those 3 letters and 1 number maybe a space or not, so I was trying to
use a wildcard of *.
Any ideals of what I might be doing wrong?
Thanks!
DW

1) Make sure the name of each field in the expression is spelled
correctly, and is included in the form's record source.

2) Make sure the name of this control is not the same as the name of
any field used in the expression.
 
Back
Top