February 19th, 2014, 06:16 PM
Join Date: Feb 2014
Time spent in forums: 3 m 17 sec
Reputation Power: 0
How to auto-populate a field based on a query on another table
I am using access 2007 and a novice user.
I am using the following tables:
1) PriceMaster with fields
The PK is a combination of PriceDate, ProductCode & UOM.
2) Sales with fields
I have a form based on the Sales table. When the user enters the SaleDate, ProductCode and the UOM, I want to query the PriceMaster table and find the record wherein
the SaleDate >= PriceDate and Sales.ProductCode = PriceMaster.ProductCode and Sales.UOM = PriceMaster.UOM.
I am struggling to get this done.
Would appreciate if someone can throw some light on how to achieve this.
Thanks in advance,