Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2002 - DLookup and punctuation

Status
Not open for further replies.

cantes903

Programmer
Aug 7, 2003
4
US
I think this is a simple problem but I can't figure it out.
I have a DLookup that I want to format:

City, State ZipCode (it needs to have the comma and spaces.
Here's what I have now:

=DLookUp("[City]&[State]&[ZipCode]","tblCompanyInfo","ID=1")

How do I get the comma and spaces?

Thanks in advance,
Christy
 
Try this:

=DLookUp("[City]","tblCompanyInfo","ID=1") & ", " & DLookUp("[State]","tblCompanyInfo","ID=1") & " " & DLookUp("[ZipCode]","tblCompanyInfo","ID=1")

Craig
 
You could also try:

=DLookUp("[City]& ', ' & [State]& ' ' & [ZipCode]","tblCompanyInfo","ID=1")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top