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!

Deleting Extra Spaces After Name In Access

Status
Not open for further replies.

jgarzoli

Technical User
Apr 25, 2005
23
US
Hi,

I have a field in a table that I imported a whole bunch of last names into. The names all have quite a few blank spaces at the end of each. So when I try to report with the last name field, The Last name pushes the first name off the page because of all the extra spaces.

Is there any easy way to delete all blank spaces after text? I'd rather not go through 4,000 individual records deleting the spaces after each last name!

Thanks in Advance,

Jeremy
 
Did you try a search-replace? It may be some sort of strange space so copy one of them -- that way you can paste it in the search box. Select the entire column and go to Edit - Find - paste the space char - and replace with nothing.
 
Tried the find and replace, but no luck. Thanks though.
 
Did you try the advice from r937 on one of the other sites you've posted this question on? Their advice seems spot on, should it be extra spaces.

Though usually, Access strips of leading and trailing spaces in text fields automaticly... wouldn't be surprised if it contains other non print characters.

Roy-Vidar
 
I would normally use the trim function
update customer2
set fld1 = trim(fld1)

set fld1 = trim(fld1), fld2=trim(fld2) ....


on all fields that may require it.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Yeah, the rtrim ended up working perfectly. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top