Question : DLookup Code

I have a small problem, i think due to the fact that my table field names "product description" and "Item Ref" have spaces

Can anyone assist with the code correction?

ProductDescription = Nz(DLookup("Product description", "tbl_LookupItemMaster", "Item Ref = '" & Forms!frm_ComplaintForm!PartNo & "'"), "Not Listed")

Answer : DLookup Code

enc losed them in square brackets []

ProductDescription = Nz(DLookup("[Product description]", "tbl_LookupItemMaster", "[Item Ref] = '" & Forms!frm_ComplaintForm!PartNo & "'"), "Not Listed")
Random Solutions  
 
programming4us programming4us