I have a form [order details] that contains a subform [sbforderdetails]. This form is for estimating cost of job. On the main form is a combo box [line] in which the user selects which line of cabinets the estimate is for. On the subform user selects a [product id] and i want the [unitprice]field to lookup the [price] in a table that contains that line's data. I used the following expression to see if this could be done
oakhill cath being one of the lines of cabinets).
=IIF (forms![order details]![line] = [oakhill cath], DLookup ("[price]","[oakhill cath]","[product id]=' " & [product id] * " ' "), " ")
placing this expression in the control source for [unitprice] it returns #name?
Since I have several different lines I can't see writing several IF expressions in the control source so where should I write this, and why does it not work? Any help will be appreciated.
=IIF (forms![order details]![line] = [oakhill cath], DLookup ("[price]","[oakhill cath]","[product id]=' " & [product id] * " ' "), " ")
placing this expression in the control source for [unitprice] it returns #name?
Since I have several different lines I can't see writing several IF expressions in the control source so where should I write this, and why does it not work? Any help will be appreciated.