Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove spaces from text

Status
Not open for further replies.

ajr1705

Programmer
Apr 12, 2006
27
0
0
GB

Is there a formula I can use to remove all spaces. I have used the trim command but I want all spaces removed thus from with the text.

E.g " AA xx"

required data "AAXX"




 
Try:

replace({table.field}," ","")

And if you've numerous, nest them, as in:

replace(replace({table.field}," ","")," ","")

Or you can loop:

whileprintingrecords;
stringvar Output:="";
numbervar counter;
for counter = 1 to len({table.field}) do(
if mid({table.field},counter,1) <> " " then
Output:=Output+mid({table.field},counter,1)
);
Output

-k
 
Boss sorry for the late reply.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top