Results 1 to 2 of 2
  1. #1
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80

    Update value in specific field of table/query

    What I want to do is take the field [Service Name] and in essence replace many values. There are about 80 different values that may show up here and I need them to be specific verbiage. I tried an update query but was new to those and it seemed I could only do 1 thing at a time? I want to take what is there 'VCP-Cardiology-636A8' and replace it with 'Cardiology' in all records. The data is imported from a source we do not control so I cannot limit how it is sent to us. Trying not to simply look for what is between the -'s as there are some fields where this is not the case. Even if I could make a VBA script somehow that would go through the entire table and just have all 80 lines similar to 'If Me.[Service Name] = "VCP-Cardiology-636A8" Then Me.[Service Name] = "Cardiology". I just can't get that to run through the entire table, only the active record.

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    In the update query, in the update to line, you can create a bunch of IIF statements,
    IIf([Service Name] Like "*Cardiology*","Cardiology")

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

Similar Threads

  1. Replies: 1
    Last Post: 04-27-2016, 04:06 PM
  2. Replies: 1
    Last Post: 05-31-2015, 09:20 AM
  3. Query to update specific field in table
    By Jblackbelt in forum Queries
    Replies: 5
    Last Post: 10-08-2014, 11:16 AM
  4. Replies: 1
    Last Post: 05-17-2013, 12:53 PM
  5. Replies: 11
    Last Post: 12-04-2010, 10:20 AM

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