Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Replace function for Access 97

Discussion in 'Information Technology' started by Domac, Jul 28, 2006.

  1. Domac

    Expand Collapse

    Here it is! For Access97 users with problems like mine!

    Function Replace(Str As String, Find As String, ReplaceWith As String) As

    Dim PosInStr As Long
    Dim LenFind As Long

    LenFind = Len(Find)
    lenReplace = Len(ReplaceWith)

    PosInStr = InStr(1, Str, Find, vbTextCompare)

    Do While PosInStr > 0

    Str = Left(Str, PosInStr - 1) & ReplaceWith & Mid(Str, PosInStr +
    PosInStr = InStr(1, Str, Find, vbTextCompare)


    Replace = Str

    End Function
  2. Loading...

Share This Page