Terry Rogers
asked on
& Character
Simple question, but my brains gone numb and I cant think of the code I need!
Im getting data from a database that has a & in it. E.g. One & Two
However when I display this in a label it shows as One _ Two,
Any help much appreciated.
Im getting data from a database that has a & in it. E.g. One & Two
However when I display this in a label it shows as One _ Two,
Any help much appreciated.
I guess you'll have to replace every & character by 2 &-characters. Give it a try and let me know what you get then....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Didn't I say exactly the same thing ?
make a condition just before in order to find out the precense of & in the field and use replace function
eg. if instr(1, rs(fieldName).value, '&') then
str=replace(rs(fieldName). value, "&", "&&")
else
str= rs(fieldName).value
end if
label1.caption=str
eg. if instr(1, rs(fieldName).value, '&') then
str=replace(rs(fieldName).
else
str= rs(fieldName).value
end if
label1.caption=str