Thread: text control
View Single Post
  #4  
Old April 24th, 2004, 04:56 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default text control

Sorry: I usually mention that in my replies, since I use Access 97 as well.
You can write your own equivalent function. There's one approach in
http://www.mvps.org/access/strings/str0004.htm at "The Access Web".

Of course, if you're going to the trouble of writing your own Replace
function, you probably should write a PunctuationStripper function, and only
call it once.

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



"John Thomas" wrote in message
...
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