By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 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 = ???")
  2.  
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

Thanks
Nigel
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.

Thanks
Nigel
Feb 11 '10 #2

nico5038
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) & "'" )
  2.  
as it requires surroundung quotes.

Nic;o)
Feb 14 '10 #3

Post your reply

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