Dlookup using Multiple fields from a table

  • Thread starter Thread starter chinaboy992
  • Start date Start date
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
 
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.
 
Back
Top