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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid Ques...How can I limit a query so that no dups are displayed?

Status
Not open for further replies.

dquin656

Programmer
May 3, 2002
5
US
Hi-

I have a table of zip codes and cities. I use a query in back of my form for a drop down list. There is no problem with the zip codes, cause there aren't any duplicates, but there are when I try to do the same with the city. Example: Chicago may have 20-50 zip codes....,

How can I get my select query to only display "Chicago" (as and example) only once, instead of for every zip code in the table?

I used to know how to do this, and it is driving me NUTS trying to remember how to do it.

Thanks in advance,

Deb Q in Chicago
Senior Applications Developer
(Just getting back into Access(2000))
 
i remember this one

in query design ther is a icon on the toolbar that looks like a "E" click this and select "group by" in the totals line that has appeared

 
Just put a DISTINCT into your SQL and you will only get each instance once.

ie. "SELECT DISTINCT CityName FROM tblCities"

Regards
Simon
 
Thanks gents...I knew there was an easy answer...

Debra Q in Chicago
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top