Dlookup using Multiple fields from a table

C

chinaboy992

I am trying to get the city, state, and zip using the Dlookup function
while using one unbound text box. I know how to work it with on
field, but I need all three fields in the expression.
the formula I use for the one field is:
=DLookUp("City","tblCompanyData","CompanyID=1")
I need to add the State and Zip fields to this expression. An
suggestions. All fields are coming from the same table
 
S

Steve Schapel

Chinaboy,

You can't do this in such a way that the 3 fields will retain their
separate identity. You can certainly return a concatenated value, for
example...
=DLookUp("[City] & ', ' [State] & ' ' &
[Zip]","tblCompanyData","[CompanyID]=1")
If this doesn't do what you want, please post back with some more
details of what you are really trying to achieve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top