G
galaxy
Guest
I have created an order form and need a subform to put the order details into.
I have created this subform and when you select the product from a combo box, i have created a dlookup to search for the products price.
This code works fine when in the subform on its own, but when I bring it into the main form, I get ?name error.
The subform is called order_item and the main form order.
The code is
=IIf(Forms!Order_Item![Prod#] Is Null,0,DLookUp("[Price_Case]","Wine Stock","[Prod#] =" & Forms!Order_Item![Prod#]))
Any ideas? (or alternatives to dlookup!)
I dont know vba yet but am willing to give anything a go!
I have created this subform and when you select the product from a combo box, i have created a dlookup to search for the products price.
This code works fine when in the subform on its own, but when I bring it into the main form, I get ?name error.
The subform is called order_item and the main form order.
The code is
=IIf(Forms!Order_Item![Prod#] Is Null,0,DLookUp("[Price_Case]","Wine Stock","[Prod#] =" & Forms!Order_Item![Prod#]))
Any ideas? (or alternatives to dlookup!)
I dont know vba yet but am willing to give anything a go!