=DLookup("current_stock", "tblStock", "[Stock_Id] = 1") CODES working fine in the main form with stock ID =1I fell into your original syntax errors. Try this one:
=DLookup("current_stock", "tblStock", "Stock_Id = 'P'" & Format([Forms]![SK Enterprice]![TblInvoiceDetail Subform].[Form]![ITEMID], "00000") & "'")
If that doesn't work try these and let us know which works:
=DLookup("current_stock", "tblStock", "[Stock_Id] = 'P00001'")
=DLookup("current_stock", "tblStock", "[Stock_Id] = 1")
others are producing error
The value of ITEMID is not being taken from subform (datasheet view)
Last edited: