dlookup in access query

Michiel Soede

Registered User.
Local time
Today, 13:21
Joined
Sep 16, 2012
Messages
12
Hi all,

Can somebody help me out with the following. In a query I use the following dlookup field:

UWN10: DLookUp("[waarde]";"forecast_Budget_Premium2";"[combi]=[Combi3] & 'UWN10' & [Veld]")

In wich a new field is created looking up a value in this query by using a concatenated search criteria. However every record of this new field is now filled with the first value / combination that is found. I would expect a different value for every unique combination.

Thanks in advance
 
1) You probably shouldnt use a DLookup to start with
2) Dlookup is definately a last resort kind of thing
3) DLookup is a major performance hit on your query, thus a bad idea.
4) did I meantion using Dlookup in a query should be prevented if possible in any way shape or form?
5) If you want to use fields from your table/query, you want to keep those outside the string something like so:
DLookUp("[waarde]";"forecast_Budget_Premium2";"[combi]=""" & [Combi3] & "UWN10" & "[Veld]""")
6) DLookup's really really are a bad idea and can probably to worked around using a "proper" query construct.
7) really think about about another solution rather than using a DLookup

Assuming both Combi3 and Veld are from your query and the thing you are looking for is a string value given de UWN10 part.

Groeten vanuit Amsterdam :)

P.S. Did I mention, Dlookup is bad :eek:
 

Users who are viewing this thread

Back
Top Bottom