Access Db. Remove Characters in a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 4DaSmiths
    New Member
    • Dec 2014
    • 2

    #1

    Access Db. Remove Characters in a string

    I would like to remove characters in the contract id #

    If returns like: 948005102-00 or 947138462-05

    I would like to remove the last 2 digits and the -

    Please healp!

    Candy
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    Candy,
    Welcome to Bytes.com. You can remove known characters with the replace function
    Code:
    Somestring=replace(Somestring,"-","")
    You can remove 2 characters from the end with
    Code:
    Somestring=Left(Somestring,Len(Somestring)-2))
    Jim

    Comment

    • 4DaSmiths
      New Member
      • Dec 2014
      • 2

      #3
      Awesome and THANKS!!!

      Comment

      Working...