expression not working in report - help!

M

Melanie

I placed a text box in my report, went into the expression
builder and keyed in the following:
=IIf([end fitting]="*Tubing",[power]&"-"&[length]&"ft"&"-"&
[sensor type]&"-"&[voltage]&"-"&[end length],[description])

For example, if [end fitting] were to equal "bare tubing"
or "braided tubing", then I should be seeing on my report
something like 210-6-10ft-R-220-6
Likewise, if [end fitting] were to equal "FJIC", I should
be seeing 210-6-10ft-R-220-FJIC

My problem is, that no matter what my [end fitting] is, I
am getting the second example. It seems something is
wrong with the "*tubing" part of my expression. I don't
know what to do to fix it.
If instead of "*tubing" I put "Bare tubing" or "braided
tubing", the expression works fine. My problem is, I need
this expression to work the same if users choose
either "Bare Tubing" or "Braided Tubing". What can I do
to make this work? I am at a loss here.
Thanks to anyone for your help!!
 
M

Melanie

Thank you sooooo much - it works great now!
-----Original Message-----
Try
=IIf(Right([end fitting],6)="Tubing",...

--
Duane Hookom
MS Access MVP
--


I placed a text box in my report, went into the expression
builder and keyed in the following:
=IIf([end fitting]="*Tubing",[power]&"-"&[length] &"ft"&"-"&
[sensor type]&"-"&[voltage]&"-"&[end length], [description])

For example, if [end fitting] were to equal "bare tubing"
or "braided tubing", then I should be seeing on my report
something like 210-6-10ft-R-220-6
Likewise, if [end fitting] were to equal "FJIC", I should
be seeing 210-6-10ft-R-220-FJIC

My problem is, that no matter what my [end fitting] is, I
am getting the second example. It seems something is
wrong with the "*tubing" part of my expression. I don't
know what to do to fix it.
If instead of "*tubing" I put "Bare tubing" or "braided
tubing", the expression works fine. My problem is, I need
this expression to work the same if users choose
either "Bare Tubing" or "Braided Tubing". What can I do
to make this work? I am at a loss here.
Thanks to anyone for your help!!


.
 
Top