HillTJ
To train a dog, first know more than the dog..
- Local time
- Yesterday, 13:54
- Joined
- Apr 1, 2019
- Messages
- 731
Friends, I have the following code behind a control on a datasheet subform. Problem is that it displays #Error Message on a new record. Clearly because neither of the 'where' components have values at that time. I tried the NZ but did not work.
=Nz(DLookUp("[SupplierProdCode] &' '& [SupplierProdDesc]","tblPart_Supplier","PartID=" & [Forms]![frmPurchaseOrders]![frmPO_Line_Item_subformNew]![PartID] & " And SupplierID =" & [Forms]![frmPurchaseOrders]![SupplierID]),"")
Appreciate it if someone can assist.
=Nz(DLookUp("[SupplierProdCode] &' '& [SupplierProdDesc]","tblPart_Supplier","PartID=" & [Forms]![frmPurchaseOrders]![frmPO_Line_Item_subformNew]![PartID] & " And SupplierID =" & [Forms]![frmPurchaseOrders]![SupplierID]),"")
Appreciate it if someone can assist.