Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

State code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ladybug - 07 Mar 2007 20:10 GMT
If I make a field in a table "State" how can I limit it to only state
abbreviations.  Is there a code for this rather than actually creating a
table and entering all the state abbreviations?
Dirk Goldgar - 07 Mar 2007 20:26 GMT
> If I make a field in a table "State" how can I limit it to only state
> abbreviations.  Is there a code for this rather than actually
> creating a table and entering all the state abbreviations?

You can limit the length of the entered text to 2, but if you really
only want to accept valid state abbreviations, you'll need to have a
table of the valid values.  Then you can use a combo box on a form, with
its Limit To List property set to Yes, to allow the user to enter or
choose only values from your table of states.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Dirk Goldgar - 07 Mar 2007 20:27 GMT
> If I make a field in a table "State" how can I limit it to only state
> abbreviations.  Is there a code for this rather than actually
> creating a table and entering all the state abbreviations?

I'm sure you can download a table of states and their abbreviations from
the web, probably from http://www.usps.com/ .

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.