Link to home
Start Free TrialLog in
Avatar of Terry Rogers
Terry RogersFlag for United Kingdom of Great Britain and Northern Ireland

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.
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

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
Avatar of rvooijs
rvooijs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Didn't I say exactly the same thing ?
Avatar of josebirla
josebirla

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