[Webinar] Streamline your web hosting managementRegister Today


MS Access 2002 Delete spaces from inside string

Posted on 2008-02-10
Medium Priority
Last Modified: 2010-04-21
Need to delete spaces from inside a string within a field
Question by:deer777
LVL 61

Accepted Solution

mbizup earned 1000 total points
ID: 20861398
You could use an update query.  Make a backup before testing any action query.

UPDATE YourTable SET YourField = Replace(YourField, " ", "")
LVL 20

Expert Comment

ID: 20861675
Your best best is to use the function Trim([YourField]).  
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 1000 total points
ID: 20861830
the trim  function only removes the *leading and trailing* spaces in a string.
the replace function that miriam suggested will remove *all* spaces in a string
LVL 44

Expert Comment

ID: 20863605
Except that pesky, chr(255) that looks like a space ;-)  Hi Mirium, Rey.

Author Closing Comment

ID: 31429620
Thanks guys!!

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
Article by: Tammy
MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief forma…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question