does anyone know where I can download files (list of city, states) to be used
in msaccess combo box? Also, has someone have a sample code on how to link
these files in a msaccess combo box? Thanks.
ummm... do you want a list of all the cities in the United States? How
about Canada? Europe? India and China?
If you want all the post offices in the United States, you can
purchase a database of zipcodes from the US Postal Service for about
$500.
No code is needed to link such a table to a combo box; simply make a
Query based on the table and use it as the combo's rowsource. All
cities in the US will be too large a list for a combo box (or for a
human being for that matter!) to handle, however.
Here's a list of US states and territories, and Canadian provinces;
copy and paste it to Notepad, save it as a file, and you can use
File... Get External Data... Import to import it into a table. Make
StateCode the Primary Key rather than using an autonumber.
StateCode State
AB ALBERTA
AK ALASKA
AL ALABAMA
AR ARKANSAS
AS AMERICAN SAMOA
AZ ARIZONA
BC BRITISH COLUMBIA
CA CALIFORNIA
CO COLORADO
CT CONNECTICUT
DC DISTRICT OF COLUMBIA
DE DELAWARE
FL FLORIDA
FM FEDERATED STATES OF MICRONESIA
GA GEORGIA
GU GUAM
HI HAWAII
IA IOWA
ID IDAHO
IL ILLINOIS
IN INDIANA
KS KANSAS
KY KENTUCKY
LA LOUISIANA
MA MASSACHUSETTS
MB MANITOBA
MD MARYLAND
ME MAINE
MH MARSHALL ISLANDS
MI MICHIGAN
MN MINNESOTA
MO MISSOURI
MP NORTHERN MARIANA ISLANDS
MS MISSISSIPPI
MT MONTANA
NB NEW BRUNSWICK
NC NORTH CAROLINA
ND NORTH DAKOTA
NE NEBRASKA
NF NEWFOUNDLAND
NH NEW HAMPSHIRE
NJ NEW JERSEY
NM NEW MEXICO
NS NOVA SCOTIA
NT NORTHWEST TERRITORY
NV NEVADA
NY NEW YORK
OH OHIO
OK OKLAHOMA
ON ONTARIO
OR OREGON
PA PENNSYLVANIA
PE PRINCE EDWARD ISLAND
PQ QUEBEC
PR PUERTO RICO
PW PALAU
RI RHODE ISLAND
SC SOUTH CAROLINA
SD SOUTH DAKOTA
SK SASKATCHEWAN
TN TENNESSEE
TX TEXAS
UT UTAH
VA VIRGINIA
VI VIRGIN ISLANDS
VT VERMONT
WA WASHINGTON
WI WISCONSIN
WV WEST VIRGINIA
WY WYOMING
YT YUKON TERRITORY
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps