Concetenate within DLookup: is it possible?

hunoob

Registered User.
Local time
Today, 10:38
Joined
Feb 17, 2009
Messages
90
Hi there Everyone! I have a formula in the expression builder.
The formula looks like this:
Code:
DLookUp("[Vezeteknev]";"Names";"[NamesID] = " & [tbl_ICS_MainTable_Risk]![RiskOwner1])

However I would like to dllookup to join some fields I need (not only one). Something like:
Code:
DLookUp("[Vezeteknev]" & "[Keresztnev]";"Names";"[NamesID] = " & [tbl_ICS_MainTable_Risk]![RiskOwner1])
But this way it does not work. :( Is it possible to concetenate fields within DLookup? If yes, how is it done?

Thank you in advance for your help!
 
Howzit

Try

Code:
DLookUp("[Vezeteknev]";"Names";"[NamesID] = " & [tbl_ICS_MainTable_Risk]![RiskOwner1]) & " " & DLookUp("[Keresztnev]";"Names";"[NamesID] = " & [tbl_ICS_MainTable_Risk]![RiskOwner1])
 
Thank you a lot for your replies! I managed it and it works!

vbaInet: as I am quite new to access I did not know how to do the joins.

Thank you again!
 
vbaInet: as I am quite new to access I did not know how to do the joins.
Ask if you don't know. This is what the forum is for.

You are using a very slow method for looking up values which is why I mentioned using a Join.

Look into using the Query Wizard, select the fields you need from the two tables and see what it does in the query design. Or in Design View right click the query, Show Tables, include your Names table in the field and if you properly designed your tables (which I doubt) it will automatically link up (or you can drag and drop).
 

Users who are viewing this thread

Back
Top Bottom