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: Most helpful
  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