Trimming a cell, remove "space character"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've got empty space in my records (e.g. "1 300", "9 833" etc) and I thought
a simple "find and replace" in tablesheet view would do the trick, but for
some reason the FIND does not work (doesn't find a "space").

Maybe I'm doing something wrong, but I can't figure why the FIND doesn't
work (I just put a space in the box).

Cheers,
Mikael
 
Mikael Lindqvist said:
I've got empty space in my records (e.g. "1 300", "9 833" etc) and I
thought
a simple "find and replace" in tablesheet view would do the trick, but for
some reason the FIND does not work (doesn't find a "space").

Maybe I'm doing something wrong, but I can't figure why the FIND doesn't
work (I just put a space in the box).
Hi Mikael,

Why not just use an update query if you want to remove
the spaces permanently?

UPDATE yurtable
SET yurfield = Replace(yurfield," ","");

{in query above, use your actual names of
"yurtable" and "yurfield"}

good luck,

gary
 
Find will find a space.
What settings did you use?
-- Look in should be set the the field you want to search or All
-- Match should be set to Any Part of Field

If the above doesn't find spaces then the "empty space" you are seeing must
be some other character or is caused by a format setting for the field in
the table design.

If it is some other character try copying the character, opening find, and
pasting the character into the find what control. To paste into the
control, you will have to put the cursor in the box and then press control +
V, you can't paste using the menu bar as that will paste into the currently
active field on the current record.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Why not just use an update query if you want to remove
the spaces permanently?

UPDATE yurtable
SET yurfield = Replace(yurfield," ","");

....then, to ensure they *are* permanently removed, add a validate rule
e.g.

NOT ALIKE '% %'

or perhaps

NOT ALIKE '%[!0-9]%'

Jamie.

--
 
Back
Top