A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

expression not working in report - help!



 
 
Thread Tools Display Modes
  #1  
Old August 20th, 2004, 03:15 PM
Melanie
external usenet poster
 
Posts: n/a
Default expression not working in report - help!

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!!
  #2  
Old August 20th, 2004, 03:23 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

Try
=IIf(Right([end fitting],6)="Tubing",...

--
Duane Hookom
MS Access MVP
--


"Melanie" wrote in message
...
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!!



  #3  
Old August 20th, 2004, 03:42 PM
Melanie
external usenet poster
 
Posts: n/a
Default

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

--
Duane Hookom
MS Access MVP
--


"Melanie" wrote in

message
...
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!!



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Size in an Expression for a report Romin Setting Up & Running Reports 0 July 13th, 2004 07:08 PM
Specify Filter criteria before running report Nikos Yannacopoulos Setting Up & Running Reports 3 June 25th, 2004 09:36 PM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM
need help make a report [email protected] General Discussion 2 June 16th, 2004 08:31 PM
expression not working??? manish Using Forms 6 June 14th, 2004 05:01 PM


All times are GMT +1. The time now is 12:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.