Access VBA | How to replace parts of a string with another string

后端 未结 4 1889
耶瑟儿~
耶瑟儿~ 2020-12-14 14:11

I am trying to create a piece of code that replaces one word with another. Example: Replace Avenue with Ave and North with N. I am using MS Access, I could use SQL REPLACE F

4条回答
  •  一向
    一向 (楼主)
    2020-12-14 15:15

    Use Access's VBA function Replace(text, find, replacement):

    Dim result As String
    
    result = Replace("Some sentence containing Avenue in it.", "Avenue", "Ave")
    

提交回复
热议问题