Need to rid fields of spaces

  • Thread starter Thread starter Josh M
  • Start date Start date
J

Josh M

I need to remove "spaces" from 2 separate fields in my
DB. There are 3500+ records that need changed so that
leaves me 7000+ entries that need spaces removed. The
spaces are in the middle of the data and at random points
(not always the third character for example). Is there a
way for me to run an update query or something to avoid
updating each record manually?

Thanks in advance,

Josh
 
Josh,

If you are using Access 2002 or newer, there is a Replace() function. In an
update query, it can be entered on the UpdateTo: row as follows:

Replace([MyField], " ", "")

If you are using Access 2000 and older, there is code at the following link:

http://www.mvps.org/access/strings/str0004.htm

There is also a shorter way to do this, if you have Access 2000 but I just
do not have that one available. I am sure you can find it by doing a search
at http://groups.google.com


hth,
 
Back
Top