I am trying to use a dlookup to lookup up the stock code for an item from a query based on the selection a user makes in a combo box on the form......i.e. they select the description of the product and the dlookup returns the stock code..
The field name of the value I am trying to retrieve is StockCode.
The query name is qry_ProdStockCodeList.
The name of the form the form is frmProduction.
The name of the combo box is ProdDesc.
My dlookup function looks like:
strTest = DLookup("[StockCode]", "[qry_ProdStockCodeList]", "[Desc]=" & [Forms]![frmProduction]![ProdDesc])
Each time the I make a selection of a product description in the combo box I get the following error message:
3075 : Syntax error (missing operator) in query expression '[Desc]=CORTLAND TRAY 72'.
If I have the equal sign what operator is missing? Can anyone help me out please.
Thanks.