I have a pretty standard invoice form, and need to know what I should base my subform off of.

I have already made the form based off of the Northwind sample database, however since they have no inventory and only orders, I get an error when I try to create a new entry ("You cannot add or change a record because a related record is required in table tblSales").

I assume this is because my subforms are based off of Sales and Product. The query is:

SELECT DISTINCTROW tblSalesDetails.SalesID, tblSalesDetails.ProductID, tblSalesDetails.Quantity, tblSalesDetails.RetailPriceCAD, tblSalesDetails.DiscountPrice, tblSalesDetails.DiscountID, ([DiscountPrice]*[Quantity]) AS Subtotal
FROM tblProducts INNER JOIN tblSalesDetails ON (tblProducts.ProductID = tblSalesDetails.ProductID) AND (tblProducts.ProductID = tblSalesDetails.ProductID) AND (tblProducts.ProductID = tblSalesDetails.ProductID)
ORDER BY tblSalesDetails.SalesID;

I am very new to this, any help is greatly appreciated =)