help removing 3 extra spaces/update

  • Thread starter Thread starter Helen
  • Start date Start date
H

Helen

hello: Can some one tell me how to enter the expression in
an Upadate query, which will remove the 3 extra spaces
that are in a field called Sentence. The field constists
of Sentences.
 
The Trim() function does that. For example, if the field with the extra
spaces is named MyField, you would update it in your Update Query as
follows:

Field: MyField
Table: MyTable
Update To: Trim([MyField])

hth,
 
This did not work. I want to remove the 3 extra spaces
that are in this Sentence field. (they are in the middle
of the sentences etc.) Thank you for your help

-----Original Message-----
The Trim() function does that. For example, if the field with the extra
spaces is named MyField, you would update it in your Update Query as
follows:

Field: MyField
Table: MyTable
Update To: Trim([MyField])

hth,


--
Cheryl Fischer
Law/Sys Associates
Houston, TX

hello: Can some one tell me how to enter the expression in
an Upadate query, which will remove the 3 extra spaces
that are in a field called Sentence. The field constists
of Sentences.


.
 
This did not work. I want to remove the 3 extra spaces
that are in this Sentence field. (they are in the middle
of the sentences etc.) Thank you for your help

please post an example. Do you want to change

This is a sentence with three consecutive blanks

to

This is a sentence with three consecutive blanks

OR

This is a sentence with three blanks

to

Thisisasentence with three blanks

OR

This is a sentence with three consecutive blanks

to

This is a sentencewith three consecutive blanks

Any of these options are correct answers to the question AS YOU HAVE
POSED IT. Remember - *you* can see your data. We cannot.
 
-----Original Message-----
This did not work. I want to remove the 3 extra spaces
that are in this Sentence field. (they are in the middle
of the sentences etc.) Thank you for your help

-----Original Message-----
The Trim() function does that. For example, if the field with the extra
spaces is named MyField, you would update it in your Update Query as
follows:

Field: MyField
Table: MyTable
Update To: Trim([MyField])

hth,


--
Cheryl Fischer
Law/Sys Associates
Houston, TX

hello: Can some one tell me how to enter the
expression
.
 
Here are two examples
The newer compu ters have not worked.
AND
This is a story about newest data.
 
You could use the Replace statement, telling it to change " " to "".
However, note that in your second example, you'll end up with

This is a storyabout newest data.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)
 
Here are two examples
The newer compu ters have not worked.
AND
This is a story about newest data.

Run an Update query based on your table.

Update the field (which I'll presume is named [Sentence]) to

REPLACE([Sentence], " ", "")

As Douglas says... computers HAVE NO INTELLIGENCE; they will do
exactly what you ask, replacing " " with ""; your second example
will indeed contain "storyabout". Access has no way to know that
"story" and "about" are two different words, whild "compu" and "ters"
are just one.
 
Back
Top