The Replace function works in Access 2000 VBA, but it can't be used directly
in queries. You need to create a user-defined "wrapper" function that
receives arguments of the appropriate types, passes them on to the Replace
function, and returns the Replace function's result. Here's one:
'---- start of code ----
Function fncReplace(strExpression As String, _
strFind As String, _
strReplace As String, _
Optional lngStart As Long = 1, _
Optional lngCount As Long = -1, _
Optional lngCompare As Long = vbBinaryCompare) _
As String
fncReplace = Replace(strExpression, strFind, strReplace, _
lngStart, lngCount, lngCompare)
End Function
'---- end of code ----
I don't know offhand whether this problem has been fixed in Access 2002.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
>.
>
"John Spencer (MVP)" <spence...@SPAMNOT.umbc.edu> wrote in message
news:3EA8173C...@SPAMNOT.umbc.edu...