i have a field address1 : street,suburb,postcode,country.
All of the words separeted by comma
need to dysplay
street
suburb,postcode,country
if one of them is missing (suburb,,country) then
the comma not be dysplayed
I have started with that and stuck
NumberVar FirstReturn := InStr ({ADDRESS1},",");
NumberVar SecondReturn := InStr (FirstReturn+1,{ADDRESS1},",");
NumberVar ThirdReturn := InStr (SecondReturn+1,{ADDRESS1},",");
NumberVar ForthReturn := InStr (ThirdReturn+1,{ADDRESS1},",");
StringVar Street := "";
StringVar Suburb := "";
StringVar Postcode := "";
StringVar Country := "";
NumberVar End :=0;
if FirstReturn > 0 then
Street := Left ({ADDRESS1},FirstReturn-1);
if SecondReturn > 0 then
Suburb := Mid ({ADDRESS1},FirstReturn+1);
if ThirdReturn > 0 then
End := ThirdReturn - SecondReturn;
if ThirdReturn <= 0 then
End := Length ({ADDRESS1});
Postcode := Mid ({ADDRESS1},ForthReturn+1);
Street & CHR(13)+ Suburb + Postcode
can I have a hand to finish this of
thanks
Nat
All of the words separeted by comma
need to dysplay
street
suburb,postcode,country
if one of them is missing (suburb,,country) then
the comma not be dysplayed
I have started with that and stuck
NumberVar FirstReturn := InStr ({ADDRESS1},",");
NumberVar SecondReturn := InStr (FirstReturn+1,{ADDRESS1},",");
NumberVar ThirdReturn := InStr (SecondReturn+1,{ADDRESS1},",");
NumberVar ForthReturn := InStr (ThirdReturn+1,{ADDRESS1},",");
StringVar Street := "";
StringVar Suburb := "";
StringVar Postcode := "";
StringVar Country := "";
NumberVar End :=0;
if FirstReturn > 0 then
Street := Left ({ADDRESS1},FirstReturn-1);
if SecondReturn > 0 then
Suburb := Mid ({ADDRESS1},FirstReturn+1);
if ThirdReturn > 0 then
End := ThirdReturn - SecondReturn;
if ThirdReturn <= 0 then
End := Length ({ADDRESS1});
Postcode := Mid ({ADDRESS1},ForthReturn+1);
Street & CHR(13)+ Suburb + Postcode
can I have a hand to finish this of
thanks
Nat