You are meant to be updating Component from parts, not the other way around
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
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?I tried this and I get the following.
Attachment 48559
I get this when I View. Which to me looks like the right answer.
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')
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