DLookup function used as criteria in query 
Author Message
 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



Tue, 13 Sep 2005 15:12:39 GMT  
 DLookup function used as criteria in query
Please post the whole SQL String.

--
HTH
Van T. Dinh
MVP (Access)


Quote:
> 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



Tue, 13 Sep 2005 21:29:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Multiple Numeric Criteria in a DLookup Function

2. Using VB Functions in Query Criteria

3. DLookup with multiple criteria A97

4. DLookup Criteria

5. dlookup and date field criteria

6. Using the Dlookup function in code

7. using a variable to specify field name in dlookup function

8. Dlookup Criteria Problem

9. The Dlookup function without using Access

10. Using global variables as criteria in query

11. Using a Form for Query Criteria

12. Not able use openrecordset method on query using form control for criteria

 

 
Powered by phpBB® Forum Software