Results 1 to 6 of 6
  1. #1
    Artur Dayaram is offline Novice
    Windows 10 Access 2019
    Join Date
    Oct 2024
    Posts
    1

    Why Doesn’t My Access Form Autofill Based on Zip Code?

    Hey everyone, I’ve been using Access for a while, and I recently came across something that’s been bugging me, and I wonder if anyone else has experienced the same. So, I have this form where I input customer details, and it works pretty well. But here’s the catch: when I enter the zip code, I was expecting it to autofill the city and state fields automatically. It seems logical, right? But it doesn’t. I’m not a developer or anything, but I feel like it should be able to pull the city and state info based on the zip code.
    Now, to focus on zip codes for a second. A zip code is essentially a postal code used by the United States Postal Service (USPS) to identify specific geographic areas. Each zip code corresponds to a particular location, making it easier for mail to be delivered efficiently. When you enter a zip code, like <link removed by moderator>, it’s typically tied to a specific city or neighborhood, which is why it would make sense for Access to automatically connect the dots and fill in those corresponding details. In other tools, I’ve noticed this feature works, which brings me to the issue I’m having here.


    I got inspired by this idea because I’ve seen similar tools in other platforms do this, and I think it would be amazing if Access forms could handle it too. Has anyone managed to set this up, or is it just not a thing in Access? I guess my main goal is to simplify data entry so that I’m not having to manually type out the city and state each time. It would save a ton of time, especially when you’re working with a lot of customer addresses.
    I’m sure there’s a workaround, but I’m not sure what it might be. Is there maybe an option I’ve overlooked? Or does it require some sort of external data source or plugin? I’m hoping someone here has some ideas because I really want to streamline this process without going too deep into customization or anything too complicated.
    I’d love to hear your thoughts. Have any of you come across this and found a good solution? Maybe there’s a simpler way I’m not thinking of that could help manage this. Any tips, tricks, or pointers would be appreciated!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Welcome! FYI I removed the link in your post. The only way Access could autofill based on zip code would be if you had the data in a table it could perform the lookup in. Perhaps there's a website where you could use an API or whatever to retrieve city and state from zip code; I've never tried.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I haven't used it, but the USPS supplies one:

    https://developer.usps.com/apis
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740

  5. #5
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    299
    To do this Access needs to "know" a lot of things. It needs to know you are entering a zip code, where and how to find the related data.
    An option is to create a zip code table in your database. Look here for options to get the data: https://www.unitedstateszipcodes.org/zip-code-database/
    If you have this table you don't need to store city and state in your customer table as this info is already in the zip code table.
    Groeten,

    Peter

  6. #6
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 11 Office 365
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538
    Link the excel file listed here to your Access DB

    https://app.box.com/s/d90xje8dkcsnv9cuux4gkx99ybexpabs

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

Similar Threads

  1. Replies: 2
    Last Post: 08-03-2021, 08:12 AM
  2. Replies: 1
    Last Post: 02-14-2015, 02:29 AM
  3. Can't Figure Out Why Code Doesn't Work
    By nosmoke in forum Programming
    Replies: 3
    Last Post: 09-26-2013, 12:23 PM
  4. Replies: 1
    Last Post: 06-10-2010, 10:47 AM
  5. Weather by Zip Code
    By graviz in forum Programming
    Replies: 0
    Last Post: 10-26-2009, 01:24 PM

Tags for this Thread

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