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 form - combo box city state drop downs

Status
Not open for further replies.

Kativs

Technical User
Sep 19, 2008
74
US
Hello. This part of Access I am not familiar with...
I have created the combo boxes and the country and state boxes work where the drop downs show all the states and countries I want to be able to select. But that part was easy because I already created my country and state tables so they pulled from that info.
However, how do I get a list of cities that I need as it's impossible to download 19,000 cities in the US without first overloading myself as well as the lists not being available without paying for it.
Now, even if I had a list of cities in a form how then would I go about having the combo box KNOW which city to pull from - from which state? I've read all kinds of forums and it's not clear to me. Please speak in access for dummies on this issue.
I have Access 2000 and pc's are XP and Vista.
Note: All the states, cities and country in my contact table show up on the form for each record but that's all.
Thanks much for any help.
 
faq702-4289

The trick is the criteria in your query of the second combo needs to reference the value of the first.
 
Sorry I don't know what you mean. Which second combo. And what value? Sorry so dumb on this one.
 
Assume you have two combos: cmboState and cmboCity

I select Alabama from CmboState and then the where condition in comboCity uses the value from comboState to filter the data. Look at the link.
 
Okay. You lost me and thanks for the zipcode database MajP..I can download it but cannot open it. Says secure.
What value and which value for which combo box. I'm sorry it's just not registering in my brain today.
 
There really is not 42k cities there are 42k zipcodes. If you do not care about zip codes then you will do a Select distinct query to return unique city states. Then you can make a new table from that query with on record for each city.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top