darbid
02-11-2009, 08:55 AM
I receive from a table "L&T"
I then have
me.control.Caption = "L&T"
The "&" is dropped. Is there a way of doing this without using the character number?
pbaldy
02-11-2009, 08:58 AM
Try doubling up on it: "L&&T"
darbid
02-11-2009, 09:05 AM
Try doubling up on it: "L&&T"
Ok thanks that works if it was a one off thing.
But this is received from a table and there may be other now or in the future.
Am I really going to have to take the field result from the table and check for a "&" and then if true add another "&" to it?
pbaldy
02-11-2009, 09:14 AM
When you're using it as a caption, the & has special meaning, so you have to double up on it to have it display. You could see if the Replace function serves your needs to replace one with two.
darbid
02-11-2009, 11:14 PM
You could see if the Replace function serves your needs to replace one with two.
Thank you pbalby - The Replace function works and is very easy to work with.
For people reading this the help files seem pretty good on the replace function even I understood them.
I use
me.control.caption = Replace(myvariable,"&","&&")Meaning that if a "&" is in myvariable then it will become "&&" and then will appear as a "&" in the caption.