Results 1 to 5 of 5
  1. #1
    Join Date
    May 2012
    Posts
    14

    Unanswered: Access 2010 Forms

    Hi All, I have created a form using "Customers" table (CustID, LastName, Address, Suburb, PostCode) but I'm not so sure how to link PostCode to suburb! I want the Database to automatically find the suburb when I enter a Post Code. how do I do that? I've tried Macro builder but not sure which command to use and how to do it! Can someone please help

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    First off, you have to a have a Table that contains the Postcodes and their related suburbs.

    Then you can either use the DLookup() function, in the AfterUpdate event of the Postcode Control, to retrieve the matching suburb, or create a Combobox based on this Table, listing both Postcodes and Suburbs. You can then use the AfterUpdate of the Combobox to assign the Postcode and suburb to their respective Controls.

    I'd use the latter approach; it allows the user to see both fields which may cut down on mistakes. If the Postcode Field is the Bound column, the user can type in the code and the AutoExpand function will take them to the correct selection.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    May 2012
    Posts
    14
    Thank you, I will give it a go.

  4. #4
    Join Date
    May 2012
    Posts
    14
    Hi Missinglinq, Im not too sure how to use DLookup()! and im using Access 2010. Here is My Table detail: Customers (CustID(PK), LastName, FirstName, Address, Suburb, Postcode, Phone).
    Thanks

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •