Results 1 to 3 of 3
  1. #1
    nguyenak is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    23

    VBA Code to search and replace when a string ends with a value

    Hello,

    I have the following in Column A

    url.com?valueA
    url.com?valueA&valueB
    url.com?valueC

    I need a function that
    1. If string "ends with" valueA or ValueC, then replace it with ValueD

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can use an Update Query to do that.
    Just create a simple Select Query using Criteria that only returns the values you want to update.
    Then change it to an Update Query and add the value you want to change it to on the "Update To" line.

  3. #3
    nguyenak is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    23
    perfect....thanks alot

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 07-05-2012, 10:33 AM
  2. Search for a String in VBA code.
    By dandoescode in forum Access
    Replies: 3
    Last Post: 06-21-2012, 11:00 AM
  3. Issue Using Replace in SQL String
    By starryNight in forum Programming
    Replies: 15
    Last Post: 06-03-2011, 01:24 PM
  4. Replace a string/text in ms-access db
    By anziga in forum Queries
    Replies: 4
    Last Post: 12-31-2010, 06:40 PM
  5. replace characters in a string
    By blazixinfo@yahoo.com in forum Access
    Replies: 6
    Last Post: 08-06-2009, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums