By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,166 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,166 IT Pros & Developers. It's quick & easy.

Dlook Up against a query

P: 34
Hi all,

I have the below code but cannot get it to work, missing operator ?
Expand|Select|Wrap|Line Numbers
  1. GroupOwner1 = DLookup("GroupOwner", "tbl_GroupOwners_Master", "Group Mapping = ???")
the problem I have is where I have the ????, I want this to refer to a column in a query called GroupMapping, is this possible. I want to open the query and call the function which in turn looks at the data in GroupMapping and returns the group owner from the tbl_GroupOwners_Master ? Any help will be greatly appreciated

Feb 11 '10 #1
Share this Question
Share on Google+
2 Replies

P: 34
Actually all,

I have written the beow in a select query but it errors, banging my head against the wall, does anyone have any ideas please ?

GroupOwner: DLookUp("[GroupOwner]","[tbl_GroupOwners_Master]","[Group Mapping] =" & Nz([GroupMapping],0))

I have two tables in my select query "table A that contains [GroupMapping] and tbl_GroupOwners_Master.

Feb 11 '10 #2

Expert 2.5K+
P: 3,072
The only problem I can see is when the [GroupMapping] is a text field. The code for that would be:
Expand|Select|Wrap|Line Numbers
  1. DLookUp("[GroupOwner]","[tbl_GroupOwners_Master]","[Group Mapping] ='" & Nz([GroupMapping],0) & "'" )
as it requires surroundung quotes.

Feb 14 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.