DLOOKUP MALFORMED

  • Thread starter Thread starter Rpettis31
  • Start date Start date
R

Rpettis31

I am doing something wrong with this DLOOKUP but I am not sure exactly what.

Me.txtMaterialCost = DLookup("MaterialCost", "tblItemMaster", "ItemNumber="
& Me.ItemNumber)
 
Rpettis31 said:
I am doing something wrong with this DLOOKUP but I am not sure
exactly what.

Me.txtMaterialCost = DLookup("MaterialCost", "tblItemMaster",
"ItemNumber=" & Me.ItemNumber)

There is nothing wrong with that syntax providing that...

ItemNumber is actually a numeric field. If it's text you need quotes around
the criteria value.

Me.ItemNumber contains a value that actually exists in the MaterialCost
table.
 
Back
Top