DLOOKUP MALFORMED

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)
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top