Use Zip Code Lookup to Populate City, State, Zip text boxes in records on sub form

Posted on 2011-10-03
Last Modified: 2012-05-12
I am using the instructions on the following link to populate the address text boxes (city, state, zip) in an address subform where there may be multiple address for a person.  The instructions work well for a single address but when I select the zip code it will populate the city, state, zip unbound text boxes for all of the address records for that person.  Is the a way to isolate writing to the text boxes for the particular address record?  
Question by:MarkSnark1
    LVL 84

    Accepted Solution

    I'm assuming you're using a Datasheet or Continuous Subform? If so, then Unbound boxes will always show the same data. The textboxes will have to be "bound" to a datasource.

    You can, of course, build a query that displays the full Address, including City/STate/Zip, and use that query to populate your form. You can then bind those boxes to the query's fields, and you should show the correct values in the subform.

    Author Comment

    Thank you LSMConsulting.  I bound the city, state, zip fields to the "address" table and obtained the desired results.

    Author Closing Comment

    Thank you.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Help in Creating Access Webapp 7 40
    C# primary key 9 47
    Need way to extend view in MS Access 47 50
    font dialog in office 64bit 12 17
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now