Hi:
Here is the following simple one code I have in the "On Change" event of combo12 combo box:
Private Sub Combo12_Change()
[Forms]![Orders Form]!Text25 = DLookup("[Unit Price]", "Products", "[Product Description]= '" & [Forms]![Orders Form]!Combo12 & "'")
End Sub
I want to use the selected value in Combo12, which gives a list of product descriptions, as the search criteria for looking up the unit price in the "Products" table, and then populating the "text25" text control on the same form with that value, which is a currency datatype. I'm getting a syntax error: Missing operator in query expression.... Thanks for the help in advance.
Here is the following simple one code I have in the "On Change" event of combo12 combo box:
Private Sub Combo12_Change()
[Forms]![Orders Form]!Text25 = DLookup("[Unit Price]", "Products", "[Product Description]= '" & [Forms]![Orders Form]!Combo12 & "'")
End Sub
I want to use the selected value in Combo12, which gives a list of product descriptions, as the search criteria for looking up the unit price in the "Products" table, and then populating the "text25" text control on the same form with that value, which is a currency datatype. I'm getting a syntax error: Missing operator in query expression.... Thanks for the help in advance.