Update Query to replace double spaces with single space



I'm not trying to post this twice, but I'm concerned no
one will see my other post, as it is nested inside another

I've been working with an Update Query to change double
spaces in a text field to single spaces, unless the double
space follows a period (.). I can get the records I want
by adding this criteria to the query:
Like "* *" And Not Like "*. *"

However, how can I write the UPDATE TO line? When I put
in "* *" it's obviously replacing the line with * *. I
only want to replace the double space within the text with
the single space, not the entire record with a single

(Getting double spaces in this field is an ongoing
problem, so I want a fix that the user can run on records
in batches, or a macro that runs 'on change'.)

Thanks again,
Apr 26, 2013
Reaction score
I know it's an old post but it helped me. This is what I was able to create with the information I found here.

Using SQL view on Access 2010:

UPDATE [Table_Name] SET [Table_Name].TestCaseHeadline = Replace([Field_Name]," "," ")
WHERE ((([Table_Name].Field Name) Like "* *"));

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