Results 1 to 5 of 5
  1. #1
    guitarzycki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    20

    Update table from a column in another table

    Click image for larger version. 
<br /><script async src=
    Name: Capture.PNG  Views: 8  Size: 109.9 KB  ID: 30293" class="thumbnail" style="float:CONFIG" />
    Greetings! I've got what I thought would be really easy at first, but is stumping me. Part of it I now know was due to a rookie mistake. I created a tool assemblies table and a separate one for assigning components using a unique ID field as the primary key that was also the tool naming convention we were using. Well, the trouble now is that we have changed our naming convention and I need to update the components table to reflect this. I have created a new column in the parent table and given all the assemblies a new unique ID. I also created a foreign key column in the child table. The question is, how do I use an update query to update the new id number in the child table where it matches the old id number from the parent?

    Any help is appreciated!
    Thanks,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    make an extra field OldID
    update all the old IDs to this field.
    now you can reference both old and new id's.

  3. #3
    guitarzycki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    20
    No way to use an update query to do this? The reason I'd like to update the old with new is so that I can still display the new numbers assigned to the old in the forms.

  4. #4
    guitarzycki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    20
    Click image for larger version. 

Name:	Capture.PNG 
Views:	8 
Size:	156.5 KB 
ID:	30296Desired change

  5. #5
    guitarzycki is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    20
    Thank you for your help on this. I figured out where I went wrong in trying to update these. I changed the relationship too early. As soon as I changed it back I was able to create an update query and it all worked out.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-12-2016, 06:57 AM
  2. Replies: 5
    Last Post: 08-25-2015, 08:39 AM
  3. Replies: 8
    Last Post: 10-03-2013, 08:11 AM
  4. Replies: 4
    Last Post: 09-04-2013, 06:40 AM
  5. Replies: 1
    Last Post: 12-16-2011, 08:16 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