Results 1 to 6 of 6
  1. #1
    lookingforK is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2012
    Posts
    31

    Question How to UPDATE multiple values for a multivalued field?

    Hi,

    I am using MS Access 2007.

    I would like to use UPDATE query to update the values in a multivalued field.

    For example, in the multivalued field, some values should be changed like:
    "1" to "Mike"


    "2" to "Jane"
    "3" to "Tom"
    ...
    "10" to "Ada"

    How can I write the query?

    Can I use the UPDATE query to change these values at the same time?


    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Google: Access query update multi-value field
    Review http://stackoverflow.com/questions/6...018502#6018502
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lookingforK is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2012
    Posts
    31
    Thank you Jane7.

    I have read the reference.

    It is only for 1 value update one time.

    For my case, I think there should be a SQL syntax like including IF, CASE, SWITCH , or ... to do the update.

    But how to?

  4. #4
    robert0123 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Dallas Texas
    Posts
    1
    Boy, for a one time deal, depending on the number of records. Id make a spreadsheet or table of the "key" (i.e. column with old value and column with new value) and then just link to the old value and "update" to the new value with a simple update query. Dont get me wrong, I love creating SQL statements, but for a one time shot...eah...not so much.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Is there a reason for using a multivalued field? Many people consider these an "abomination". If you can go to a simple table with this data, you may save yourself a lot of headaches and time.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I don't use multi-value fields because of the headaches they cause.

    What you want might require VBA code.

    Refer to links in your other thread https://www.accessforums.net/access/...eld-32544.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-28-2013, 11:59 AM
  2. Replies: 2
    Last Post: 12-10-2012, 02:15 PM
  3. Replacing many values at once in a multiple values checkbox field.
    By ConfusedDatabaseDesigner in forum Forms
    Replies: 2
    Last Post: 07-20-2012, 08:58 AM
  4. Multivalued Look-Up Field Problem
    By Mike Wood in forum Access
    Replies: 4
    Last Post: 02-27-2012, 01:26 PM
  5. Update Query selecting multiple values in one field
    By Zipster1967 in forum Queries
    Replies: 1
    Last Post: 08-15-2011, 12:22 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