U.S. State Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know a similar question was answered recently but what I'm looking for is slightly different. On a form I have a combo box which pulls all the states' names, spelled out, from a table. What I would like is for the user to be able to type (for example) WV in the box and have West Virginia come up from the list. Then that full state name will be stored in the "state" field of my main table. Can it be done the same way as with the separate text box?

Thanks,
Michael
 
I know a similar question was answered recently but what I'm looking for is slightly different. On a form I have a combo box which pulls all the states' names, spelled out, from a table. What I would like is for the user to be able to type (for example) WV in the box and have West Virginia come up from the list. Then that full state name will be stored in the "state" field of my main table. Can it be done the same way as with the separate text box?

Thanks,
Michael

Since mailing addresses typically use the two-letter state
abbreviation (WV rather than West Virginia), I'd suggest having a
table with all 50 states (or, to be thorough, all the states, Canadian
provinces, and territories... see below, copy and paste it into a
table).

You can then base a Combo Box on this table and use either the
abbreviation *or* the state/province/terrirtory name as the Bound
Column, whichever is appropriate.

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
NU NUNAVUT
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
 
John Vinson said:
StateCode State
AB ALBERTA
BC BRITISH COLUMBIA
MB MANITOBA
NB NEW BRUNSWICK
NF NEWFOUNDLAND
NS NOVA SCOTIA
NT NORTHWEST TERRITORY
NU NUNAVUT
ON ONTARIO
PE PRINCE EDWARD ISLAND
PQ QUEBEC
SK SASKATCHEWAN

Your list is a little out-of-date wrt Canada, John. The official codes for
Newfoundland and Quebec changed a few years ago (to NL and QC respectively),
and while you've got the new territory (Nunavut), you forgot one of the old
territories. Yukon (YT) is not just a DBMS! <g>

(The change from NF to NL is because the province is officially Newfoundland
and Labrador)
 
Your list is a little out-of-date wrt Canada, John. The official codes for
Newfoundland and Quebec changed a few years ago (to NL and QC respectively),
and while you've got the new territory (Nunavut), you forgot one of the old
territories. Yukon (YT) is not just a DBMS! <g>

Thanks Douglas! I'll update it in my databases as well.
 
If you have international possibilities for your location structures, you
may also want to check out:

http://www.cia.gov/cia/publications/factbook/appendix/appendix-d.html

I incorporated this data into a Countries table, and even added the
respective flag images to it (which can also be found elsewhere on that
site).

--
Brian Kastel


--Original Message----------------

Your list is a little out-of-date wrt Canada, John. The official codes for
Newfoundland and Quebec changed a few years ago (to NL and QC respectively),
and while you've got the new territory (Nunavut), you forgot one of the old
territories. Yukon (YT) is not just a DBMS! <g>

Thanks Douglas! I'll update it in my databases as well.
 
Back
Top