Thread: text control
View Single Post
  #3  
Old April 24th, 2004, 04:50 PM
John Thomas
external usenet poster
 
Posts: n/a
Default text control

Thanks, I've seen that replace mentioned before, but must after office 97,
which is what I use and is not avaiable to me.

I have been playing in msword with find/replace and notice that if I use a
wildcard search like [aA-zZ], it will only select text and bypass
punctuation. Do you know of a way I could use that method, maybe in a do
loop to evalute a variable, stripping it of punctuation.

thanks john

"Douglas J. Steele" wrote in message
...
There's nothing built into Access to do this that I'm aware of.

To do it manually, use the Replace statement multiple times.

strText = Replace(strText, ".", "")
strText = Replace(strText, ", ", "")
strText = Replace(strText, ":", "")

etc.

or

strText = Replace(Replace(Replace(strText, ".", ""), ",", ""), ":", "")

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"John Thomas" wrote in message
...
Is there a way to Remove all punctuation from a text string, without
identifying each type of punctuation, if not what is the best way to do

it
with the text as a variable.

Thanks John