Home All Groups Group Topic Archive Search About

Weird Button Caption Problem

Author
1 Apr 2005 1:54 PM
Jasper Jones
For some reason if I set the text property of a command button to
something like "Mr & Mrs Smith" the end result is a command button with
the caption of "Mr _Mrs Smith".  Does anybody know how I can include
the & sign in my command buttons?  Is this a bug? Is there a work
around?

Please help, I really need the & symbol to work as I'm reading these
names from a database and it looks daft with the underscore...

Author
1 Apr 2005 2:06 PM
Herfried K. Wagner [MVP]
"Jasper Jones" <jasper***@gmail.com> schrieb:
> For some reason if I set the text property of a command button to
> something like "Mr & Mrs Smith" the end result is a command button with
> the caption of "Mr _Mrs Smith".  Does anybody know how I can include
> the & sign in my command buttons?  Is this a bug? Is there a work
> around?

Replace each single "&" character by two consecutive "&" characters ("&&").

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
1 Apr 2005 2:15 PM
Jasper Jones
Thank you so much.