I'm trying to use the & symbol in a Caption or a Label and when I publish the form, it gives me a _
I want to use it for buttons and other labels for thing like, "Save & Close" but can't find anything about using it.
Thanks in advance.
I'm trying to use the & symbol in a Caption or a Label and when I publish the form, it gives me a _
I want to use it for buttons and other labels for thing like, "Save & Close" but can't find anything about using it.
Thanks in advance.
There are two ways. One is simply to double up on the character:
Johnson && Johnson
will work. The other is to use the Chr() function.
"Johnson " & Chr(123) & " Johnson"
where 123 is the ASCII value of the ampersand.
if the caption is coming from somewhere else, such as a caption property for a form, you can try
me.mylabel.caption="'" & somevalue & "'"
or try
me.mylabel.caption=replace(somevalue,"&","&&")