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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Blanks After Last Character in string 1

Status
Not open for further replies.

Mikeauz

Technical User
Jul 23, 2002
75
AU
Hi,

I have a problem where an address looks like
"Art Road " and I'm trying to get rid of the blanks at the end without loosing the blank between the words.

For Example "Art Road " becomes "Art Road"

If I was just trying to trim blanks where a single word was involved I would use:
Left(Street, InStr(1, Street, " ") - 1)

but I'm not sure if that will help with this situation.

Thanks for any help
Mike
 
Replace this:
Left(Street, InStr(1, Street, " ") - 1)
By this:
Trim(Street)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top