Results 1 to 4 of 4

Thread: REPLACE (A2K)

  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    REPLACE (A2K)

    I have:
    <pre>Exp1:REPLACE([tPhysician],",","")</pre>

    in a query to REPLACE commas with nothing. However, when I attempt to run the query I get:
    <pre>Undefined funtion REPLACE in expression</pre>

    What have I done wrong now? Anyone have any idea.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: REPLACE (A2K)

    The only thing you've done wrong, it not upgrade to O2K3
    I gotten bit by the same thing.

    See link in this post <post#=646,654>post 646,654</post#>

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: REPLACE (A2K)

    Didn't realize that....your help is much appreciated.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: REPLACE (A2K)

    You can define a custom function in a standard module:
    <code>
    Public Function MyReplace(Expr, What As String, Replace As String)
    If IsNull(Expr) Then
    MyReplace = Null
    Else
    MyReplace = Replace(Expr, What, Replace)
    End If
    End Function
    </code>
    Use like this:
    <code>
    Exp1: MyReplace([tPhysician],",","")</code>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •