Results 1 to 3 of 3
  1. #1
    Susan D is offline Novice
    Windows 8 Access 2013
    Join Date
    Mar 2014

    Prefill the City and State upon entering the Zip on a form

    I am new to this and have created a database (which I have been populating). I would like to enter the zip code and automatically have the city and state prefill. I have a table associated with my database which currently holds all the zip codes for PA (yes, I only need PA zip codes). How do I change my current database / form to do this. Doing this will keep an accurate record and will save time. I would appreciate any help. Thank you ... Susan

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Is the zip the primary key of the zip codes table?

    One approach is to include the zip code table in the form RecordSource, join type "Include all records of the {primary table} and only those records of ZipCodes that match". Bind textboxes to city and state fields, set properties Locked Yes and TabStop No.

    There is no reason to save the city and state to the primary table. Retrieve them whenever needed by joining tables in query.
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Susan D is offline Novice
    Windows 8 Access 2013
    Join Date
    Mar 2014
    Thank you, I will give it a try and let you know!

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

Similar Threads

  1. Prefill records to a subform
    By benks in forum Programming
    Replies: 14
    Last Post: 05-29-2013, 06:52 PM
  2. To query out city names
    By lizzywu in forum Queries
    Replies: 2
    Last Post: 11-26-2012, 11:59 AM
  3. Texas City,State,Zip and Area Code
    By burrina in forum Sample Databases
    Replies: 0
    Last Post: 11-12-2012, 10:35 PM
  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
Tech Forums: Microsoft Office Forums