Is there some neat method to change an address line from upper case to title case, e.g.
I was doing it with
This failed - and stopped the report - because there were actully two spaces between "A" and "SLOUGH".
Short of replacing double-spaces with single spaces, and likewise for triple spaces etc., is there some way to handle this?
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
Code:
26 A SLOUGH ROAD
26 A Slough Road
Code:
if ubound(Split({@ValidStreet}, " ")) = 5
then
Left(Split({@ValidStreet}, " ")[1], 1)
& Lowercase(Right(Split({@ValidStreet}, " ")[1], (Length(Split({@ValidStreet}, " ")[1])-1)))
& " " &
Left(Split({@ValidStreet}, " ")[2], 1)
& Lowercase(Right(Split({@ValidStreet}, " ")[2], (Length(Split({@ValidStreet}, " ")[2])-1)))
& " " &
Left(Split({@ValidStreet}, " ")[3], 1)
& Lowercase(Right(Split({@ValidStreet}, " ")[3], (Length(Split({@ValidStreet}, " ")[3])-1)))
& " " &
Left(Split({@ValidStreet}, " ")[4], 1)
& Lowercase(Right(Split({@ValidStreet}, " ")[4], (Length(Split({@ValidStreet}, " ")[4])-1)))
& " " &
Left(Split({@ValidStreet}, " ")[4], 1)
& Lowercase(Right(Split({@ValidStreet}, " ")[5], (Length(Split({@ValidStreet}, " ")[5])-1)))
Short of replacing double-spaces with single spaces, and likewise for triple spaces etc., is there some way to handle this?
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10