IIf Condition

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
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top