i have a question re: using dlookup in a query.
i need to include a 'looked up' cost value from a table in a query so this value can be used to calculate other fields (oncosts etc) within the Query.
If I use Dlookup in the query can I reference the matching record Code within the query itself?
Eg; the matching values required are in Table2 and the Query is called ‘queryFreight’, so i'm trying this (but not working);
Dlookup ([ProductFreightCost],[Table2], [Table2].[ProductID]=[queryFreight].[productcode])
is this the correct syntax?
Also, what does the function return if the lookup value isn't found - no matching productID?
i need to include a 'looked up' cost value from a table in a query so this value can be used to calculate other fields (oncosts etc) within the Query.
If I use Dlookup in the query can I reference the matching record Code within the query itself?
Eg; the matching values required are in Table2 and the Query is called ‘queryFreight’, so i'm trying this (but not working);
Dlookup ([ProductFreightCost],[Table2], [Table2].[ProductID]=[queryFreight].[productcode])
is this the correct syntax?
Also, what does the function return if the lookup value isn't found - no matching productID?