Results 1 to 4 of 4
  1. #1
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,432

    Auto enter city and state when zipcode entered

    ZipLookup.zip

    A common shortfall with many examples of handling this effort have to do with zipcodes that cover multiple cities. This example will let you easily define any number of cities residing in the same zipcode.


    Here's what happens when you type a zipcode that's not in the DB:
    Click image for larger version. 

Name:	ziplookpng.png 
Views:	114 
Size:	61.2 KB 
ID:	40565Click image for larger version. 

Name:	edit.png 
Views:	99 
Size:	13.2 KB 
ID:	40576

    And here's what happens if the zipcode you type in is already defined in multiple cities:
    Click image for larger version. 

Name:	zipmult.png 
Views:	114 
Size:	33.0 KB 
ID:	40566
    If the above popup doesn't list the desired city for that zipcode, you use the ZipCode Maint button to add it.
    Last edited by davegri; 12-31-2019 at 01:23 PM.

  2. #2
    KathCobb is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    4
    This is absolutely amazing and exactly what I need to do. Can you tell me why you added a special ZipId field that combines the autonumber and the zip code instead of just using the autonumber.

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,432
    Could have done that, I suppose. I coded this about 20 years ago, so my reasoning for the design is foggy.
    Last edited by davegri; 04-22-2020 at 06:18 PM.

  4. #4
    KathCobb is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    4
    Well its absolutely perfect for my needs and I thank you very much for sharing it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. API to find City,State given a zip code
    By GraeagleBill in forum Programming
    Replies: 6
    Last Post: 03-18-2019, 12:11 PM
  2. Create address, city, state, zip columns
    By tmcrouse in forum Queries
    Replies: 5
    Last Post: 06-08-2015, 12:51 PM
  3. Replies: 2
    Last Post: 03-18-2014, 10:15 AM
  4. Normalizing various City/County/State combinations (w/out zip)
    By DorkyDuvessa in forum Database Design
    Replies: 2
    Last Post: 05-08-2011, 07:49 PM
  5. City, State Zip lookup
    By garywmcp in forum Access
    Replies: 1
    Last Post: 04-24-2011, 06:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums