Avatar of Dustin Stanley
Dustin Stanley

asked on 

MS Access Query Join 2 Tables Together for one Subform Master Child Link and cannot add record Join key of table 'ProdLocations' not in recordset

I have a subform that is made by query of two tables joined.  The two tables are "ProdLocations" and "Products". This Subform is Linked to the Mainform by "SkuID".  I have most of it figured out but two thing.


1: The field "SkuID" which is found in the "Products" table is not auto populating like it should on a new entry.

2: If I was to click on the field "QtyLoc"  it errors with: cannot add record Join key of table 'ProdLocations' not in recordset. BUT if I click on the new record row and then back on "QtyLoc" then it will allow me to enter a Quantity. (Which I believe has to do with the "SkuID" above.

It is putting the information into the tables all correctly accept the "SkuID" in the "Products" Table

I know query joining tables for a subform isn't the best approach but I need a single form to enter fields"Condition ID" "Price" in the Products table and "QtyLoc" into the "Locations Table.

Subform Query:

SELECT Products.ConditionID, Products.Price, Products.ProductID, Products.ProdConSku, ProdLocations.ProdLocID, ProdLocations.LocID, ProdLocations.QtyLoc, Products.SkuID
FROM Products INNER JOIN ProdLocations ON Products.ProductID = ProdLocations.ProductID
WHERE (((ProdLocations.LocID)=1));

Open in new window


db99.jpg
db100.jpg
db101.jpg
db102.jpg




THANK YOU!
Microsoft Access

Avatar of undefined
Last Comment
Dustin Stanley

8/22/2022 - Mon