Add text to control

E

Ellen

Hello,
I'd like to add some text after a text box. For instance
I have a field named "weight" and I'd like
"pounds" to display after the numeral value of the weight.

I think it should look something like [weight]&"pounds"

Thanks,
Ellen
 
F

fredg

Hello,
I'd like to add some text after a text box. For instance
I have a field named "weight" and I'd like
"pounds" to display after the numeral value of the weight.

I think it should look something like [weight]&"pounds"

Thanks,
Ellen

Add an unbound control to the report.
Set it's control source to:
=[Weight] & " pounds"
 
G

Guest

Thanks, Fred. When I tried this with an existing bound
control, it didn't work. When I started anew with an
unbound control it worked. Nice to have such a forum to
get questions answered!
-----Original Message-----
Hello,
I'd like to add some text after a text box. For instance
I have a field named "weight" and I'd like
"pounds" to display after the numeral value of the weight.

I think it should look something like [weight]&"pounds"

Thanks,
Ellen

Add an unbound control to the report.
Set it's control source to:
=[Weight] & " pounds"
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
F

fredg

Thanks, Fred. When I tried this with an existing bound
control, it didn't work. When I started anew with an
unbound control it worked. Nice to have such a forum to
get questions answered!
-----Original Message-----
Hello,
I'd like to add some text after a text box. For instance
I have a field named "weight" and I'd like
"pounds" to display after the numeral value of the weight.

I think it should look something like [weight]&"pounds"

Thanks,
Ellen

Add an unbound control to the report.
Set it's control source to:
=[Weight] & " pounds"
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Remember this line?
Add an unbound control to the report.
That's because the name of the bound control "Weight" was the same as
the name of the field [Weight] used in it's control source expression.
A control with an expression as it's control source cannot have the
same name as a field used in it's expression. Access gets confused.

When you used the unbound control, Access assigned it a default name,
such as Text2., Text 33, etc.
All you really needed to have done was change the name of the control
to something like "txtWeight".
I find it easier to always start with an unbound control.
 
Top