Removing Spaces

  • Thread starter Thread starter Gary W
  • Start date Start date
G

Gary W

Hi,

RE: Access 2002

I have a table that has a column for a reason code (text
field). Someone imported reason codes that have spaces in
front and sometimes behind the actual text reason code.

Rather than delete those and start over, I tried
highlighting the column and using the find/replace using
(space) in find and (nothing) in replace. Access gives me
an error stating that I cannot perform the replace until I
correct the errors first. I have never had a problem
using find/replace before.

For future reference is there an update query/macro that I
could use to eliminate spaces from columns that should not
have them?

Thanks in advance for any information you can provide!

Gary
 
Hi Gary,

Explore using LTrim & RTrim to clean up those blank spaces. Perhaps run a
select query with an expression using LTrim & RTrim on the problem field then
copy/paste the trimmed field over the problem field.

hth

Judi B
 
Back
Top