
DLookup function used as criteria in query
I have a query named test1. The table that is associated
with this query is testdata. I am trying to do a
comparison test. I want to see if one field within the
testdata table is a valid location code based on a master
location table. I have tried the following criteria and
variants with no luck.
DLookUp("[shelfbin]","MasterLocations","[shelfbin] = " &
[table]![testdata]![f1])
I have tried leaving the table keyword off and also tried
using the name of the query...as examples
DLookUp("[shelfbin]","MasterLocations","[shelfbin] = " &
[query]![test1]![f1])
DLookUp("[shelfbin]","MasterLocations","[shelfbin] = " &
[test1]![f1])
Thanks,
BT