Auto Enter County, State & Zip after entering City

Anonymous
2010-12-27T19:38:00+00:00

I'm trying to make data entry easier. We have a relatively small client base (3 counties) and I'm wondering if I create a table with all of the cities in the counties grouped together with states and zips if Access will be able to AutoEnter the County, State and Zip after the City is entered?

(I've only got beginner Access 2010 under my belt....hoping they will send me to level 2 at the very least...)

THANKS so very much for your time!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

51 answers

Sort by: Newest
  1. Anonymous
    2015-03-29T12:17:45+00:00

    Firstly, for future reference take note of Scott's admonition regarding piggy-backing.

    For an example of how data from a hierarchically related set of geographical entity types, cities and regions in my example, are automatically shown in a form when the lowest level of the hierarchy, city, is selected see NotInList.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    In this little demo file the frmContacts form automatically shows the region in a read-only text box when the city is selected.  The primary purpose of this demo is to illustrate the use of the NotInList event procedure by which a new city and/or region is entered, but not earlier comments about cities legitimately having duplicate names.  This issue is covered in my demo's opening form where an alternative method of inserting a new contact via a button is included.  Personal names are also legitimately duplicated of course.

    Note that in my demo the post code is included as a column in the referencing Contacts table as UK post codes do not map to the boundaries of the administrative areas, so are not functionally determined by the key of one of the referencing tables.  I can't comment about US zip codes or post codes in other countries, however.

    For an illustration of how a top-down approach to data entry in this sort of hierarchy can be undertaken, see ComboDemo.zip in the same OneDrive folder.  This uses the local administrative areas of County, District and Civil parish in my neck of the woods, and data can be entered top-down into County, then district, then parish via correlated combo boxes.

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,840 Reputation points Volunteer Moderator
    2015-03-29T11:51:37+00:00

    As I said, please don't piggyback onto an older thread. You can start a new thread and insert a link to the older thread.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-03-29T00:48:49+00:00

    I know it is 5 years after Bob Larson posted his reply but when I try the link it is not working.  Does anyone have a new link for some sample fills or know of where I can more information on creating this process of adding the data from a query that has been created or using the unbound feature.

    Was this answer helpful?

    0 comments No comments
  4. ScottGem 68,840 Reputation points Volunteer Moderator
    2015-02-24T20:56:22+00:00

    First, please don't piggyback your question on an older thread. Please use the Participate link to start a new thread. You can link to a previous thread if you think its applicable. 

    Normalization has several levels. Generally, developers try to adhere to Third Normal Form (3NF). So, it is not necessarily bad to enter both city and zip. In fact, since some zip code span multiple cities, it may be cumbersome to use the Zipcode as a foreign key to determine City.

    I generally do include City/State/Zip fields in my databases, though I may use lookup tables to autofill the info is I can. 

    I really don't see anything to fix. If you want to discuss this further, please do so in a new question.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2015-02-24T20:28:20+00:00

    Scott, what is the best way to go about correcting a database that breaks this normalization rule.   I have a contacts table that I enter the zip code and city (State is set to a default) for each record.  I see from this thread that my entering the city and zip code for each record is not the way it should be done.  

    What's the best procedure for fixing this?

    Was this answer helpful?

    0 comments No comments