Results 1 to 12 of 12
  1. #1
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89

    Combo Box Populates Textboxes


    In access 2007, I need a combo box to populate multiple textboxes based on the selected value. Is this possible from a table or do I have to create a query? Can someone give me the code to make this happen? Thank you. :]

  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,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    Those are so fun to do. It looks like magic.

  4. #4
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Yes just like that. :] only is there any way that I can show no duplicates for Column(2)?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Show in the combo or allow in the other table? More details please.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    In the combo box show no duplicates. I need duplicates in my table.

    I have a combo box I'm trying to show the name in, and it populate the address, and phone number textboxes.

    I'm making this program for a small business, so there are over a thousand and some entries because everytime someone enters all the information on the form, it saves it and they need it for their records. However for the combo boxes and textboxes I'm trying to set up like this, it's all contractor information, and it's constantly repeated. So they want to make it simple by the selecting the name, and it automatically filling it in the phone and address, but each contractor name is listed about twenty or more times in the table because it's repeated.

    I hope this is enough details. If not, let me know and I will try again.

  7. #7
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Oh, and all my information is in one table.

  8. #8
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Thank you for your all help :] I finally got it all working. I just set them up through queries. :] Problem solved.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Glad you got it sorted out. I assume you either used DISTINCT or GROUP BY?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Actually, no, that didn't work like I wanted it to. So, instead I just selected yes for unique values in the query.

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If you look at the SQL of the query, that selection added the DISTINCT keyword.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Actually it added GROUP BY to the end. However just adding DISTINCT didn't work how I needed it to because it tried to do sort by the ID number, and not the name. I needed it to sort by the name instead.

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

Similar Threads

  1. Replies: 14
    Last Post: 07-19-2011, 04:00 PM
  2. Replies: 0
    Last Post: 06-29-2011, 01:04 PM
  3. Replies: 1
    Last Post: 11-13-2010, 12:57 PM
  4. Replies: 3
    Last Post: 07-31-2010, 07:41 AM
  5. Replies: 3
    Last Post: 09-26-2009, 01:57 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