REPLACE function in Access query ?

J

Jcwy

Dear All,
I got problem to use the REPLACE function in microsoft access query, do you
all know any other similar function that I can use ?

Thanks.

regard,
Jcwy
 
J

John Vinson

Dear All,
I got problem to use the REPLACE function in microsoft access query, do you
all know any other similar function that I can use ?

What version of Access are you running? I ask because A97 (and
before), A2000 and AccessXP all handle Replace *differently*.

I'll guess you're using A2000 - it has a Replace function (unlike A97)
but oddly enough it cannot be called from a Query. The getaround is to
write a dumb little wrapper:

Public Function QReplace(strString as String, strOld as String, strNew
as String) As String
QReplace = Replace(strString, strOld, strNew)
End Function

and use QReplace in your query.
 

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

Top