Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    108
    Provided Answers: 1

    Unanswered: Replace Function

    Hi,

    Using Access 2013.
    Trying to Replace " " for a given string beginning with the third character, but the function is replacing beginning at first character

    Any thoughts as why?

    My Current:
    IDNew: Replace([ID]," ","",3,1,1)

    But I have tried many variations with similar results. Should leave first two char's intact

    thx
    goss

  2. #2
    Join Date
    Jan 2005
    Posts
    146
    The Replace function returns all characters beginning at character 3 and replaces what you want at that point and beyond. For your results you'll need something like this:
    Code:
    MyResults = Left("f fte st",3) & Replace(mid("f fte st",4)," ","")
    MyResults = "f ftest"

Posting Permissions

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