Using an & in a label on a form

L

Lori

How can I use an ampersand (&) in a label on a form? When I type it, it is
displayed as an underscore on the form. I am using Access 2002.

Thanks
 
G

George

Dear friend,

Instead of adding a label add a text box and type the following:

="Your Label text & SomeMoreText"

Remeber Enable = No, Locked = Yes and also the formatting in order to be
seem as a label (transparent border and fill color)

George


Ο χÏήστης "Lori" έγγÏαψε:
 
K

Klatuu

FYI, it is done the same way you handle quotes. Using && will display one &,
So

Me.lblSomething.Caption = "Smith && Wesson" will display Simth & Wesson
 
B

bernadou

Thanks to all. That was simple! To store a single "&" in the field and then
display that value in a lable I just used:

label.caption = replace (fieldValue,"&", "&&")

Worked great thanks to the assistance.

B
 

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