Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858

    You are meant to be updating Component from parts, not the other way around
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  2. #17
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Quote Originally Posted by Summit_IT View Post
    I tried this and I get the following.


    Attachment 48559
    I get this when I View. Which to me looks like the right answer.
    You're showing in the query designer that you're trying to set the Master Parts List field equal to the Master Sub Component Data field. I thought that was supposed to be the other way around?

    What happens when you try to actually execute the code I provided? (as Micron points out I think you can safely ignore the blank rows in the update query's 'preview')

    Click image for larger version. 

Name:	Untitled.png 
Views:	19 
Size:	53.4 KB 
ID:	48562

  3. #18
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    oldtblMasterPartList.PN_ID is an autonumber, so you can't update that field, but it also cannot be empty. The PN_ID in oldtblMasterSubComponentData is a long integer and can be updated. so all records where MasterPartList.MasterPN finds a linked record in the subcomponent table will be correctly updated. The remaining empty ones, you'll need to check and delete them, or fill in the corresponding PN_ID manually.
    Last edited by NoellaG; 08-25-2022 at 08:37 AM. Reason: typo's

  4. #19
    PMal is offline Novice
    Windows 11 Office 365
    Join Date
    Jul 2022
    Posts
    12
    A little late to the party but I've just been doing something similar, this is my set up which worked....
    Click image for larger version. 

Name:	1.png 
Views:	8 
Size:	14.6 KB 
ID:	48748

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Parent and Child Table Relations
    By Saabra in forum Import/Export Data
    Replies: 3
    Last Post: 01-12-2020, 06:53 PM
  2. Replies: 2
    Last Post: 09-25-2018, 05:33 PM
  3. Replies: 2
    Last Post: 10-26-2015, 06:14 AM
  4. Replies: 2
    Last Post: 10-07-2013, 11:01 AM
  5. Replies: 10
    Last Post: 01-17-2011, 10:47 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