Can anyone help please. I have some code which when a product is entered in an order table the after update event looks up the price in the products table and enters the case price automatically. The code is as follows.
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!PRODUCTID
' Look up product's case price and assign it to case Price control.
Me!CASEPRICE = DLookup("caseprice", "Products", strFilter)
This however is not sufficient for the purpose I require. Since I started the project things!! keep getting added. Now we need each customer to have their own unique price list.
Therefore, the system needs to look up the customeraccountid in orders, then the customeraccountid, product id and the caseprice from the customerprices table in order to match them all and automatically enter this caseprice into the caseprice field on the orders form for the specific customer.
Has anyone got any ideas. i'm no programmer.
Dan
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!PRODUCTID
' Look up product's case price and assign it to case Price control.
Me!CASEPRICE = DLookup("caseprice", "Products", strFilter)
This however is not sufficient for the purpose I require. Since I started the project things!! keep getting added. Now we need each customer to have their own unique price list.
Therefore, the system needs to look up the customeraccountid in orders, then the customeraccountid, product id and the caseprice from the customerprices table in order to match them all and automatically enter this caseprice into the caseprice field on the orders form for the specific customer.
Has anyone got any ideas. i'm no programmer.
Dan