REPLACE function in Access query ?

  • Thread starter Thread starter Jcwy
  • Start date Start date
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
 
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.
 
Back
Top