Results 1 to 6 of 6
  1. #1
    lannoe is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2006
    Posts
    7

    Update one field from another in the same table.

    This is probably a very basic question ...

    I want to update an empty field with the value from another field. Can I use the Update Query? What would be my syntax?



    Thank you for your help in advance.

    Lori

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You can but why? Why duplicate data in table?

    UPDATE tablename SET field2 = field1;
    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
    lannoe is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2006
    Posts
    7
    Where do I type the code?

    Because of the way our management software is set up. I need to update the one field and then we will delete the old field. We have to export the data from the software into Access to make this change.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Okay, one-time occurrence. The UPDATE sql should populate the second field.
    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.

  5. #5
    lannoe is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2006
    Posts
    7
    I know it should but where do I type the code?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are you using query builder to create an UPDATE query object? Reference the old field in the Update To row under the new field.
    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: 05-17-2013, 12:53 PM
  2. Replies: 3
    Last Post: 02-13-2013, 10:15 AM
  3. Replies: 5
    Last Post: 11-01-2012, 09:26 AM
  4. Replies: 1
    Last Post: 08-31-2011, 04:03 PM
  5. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 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