TRIMING UNWANTED SPACES

G

Guest

EXAMPLE RETURN
10- 00-00-00 10-00-00-00
120- 00-00-00 120-00-00-00
7000- 00-00-00 7000- 00-00-00
 
V

Van T. Dinh

Use the Replace function in an Update Query to replace " " with zero-length
String "".

If you use AXP, no prob. If you use A2K, there is a bug in using Replace()
in a Query so you need to write a simple wrapper function. If you use A97,
Replace() is not available but a custom Replace() has been posted in these
newsgroups previously.
 
V

Van T. Dinh

Larry

Trim only removes spaces at the beginning or the end of the expression but
leaves the spaces in the middle.
 
J

John Vinson

EXAMPLE RETURN
10- 00-00-00 10-00-00-00
120- 00-00-00 120-00-00-00
7000- 00-00-00 7000- 00-00-00

7000-00-00-00 I presume you meant here?

What version of Access? IF you're using AccessXP or later, update the
field to

Replace([fieldname], " ", "")

If you're using 2000 or older post back with your version (without the
Caps Lock key please). It's doable but takes some code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top