I have two tables in an Access database. Table "StockCodeC ost" stores the StockCode, Cost, and Date (for when the cost of the StockCode changes). This table essentially keeps track of any price change for the StockCode.
Then I have another table "StockCodeSales ". This table stores the StockCode, QTYSold, and DateSold.
I want to create a query that can show me the sum of the costs for each transaction (each sale). This requires looking up the cost of the stock code at the time of the sale.
I have a query that will return the cost of the stock code based on a date parameter that I enter. I have tried to use this as a sub query in another query to link my sales table together, but I am not having any luck.
How do I use the DateSold value from one table to be the parameter for my sub query?
Then I have another table "StockCodeSales ". This table stores the StockCode, QTYSold, and DateSold.
I want to create a query that can show me the sum of the costs for each transaction (each sale). This requires looking up the cost of the stock code at the time of the sale.
I have a query that will return the cost of the stock code based on a date parameter that I enter. I have tried to use this as a sub query in another query to link my sales table together, but I am not having any luck.
How do I use the DateSold value from one table to be the parameter for my sub query?
Comment