Results 1 to 7 of 7
  1. #1
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35

    Dynamic combo box

    I have a form with two combo box and I want the second combo box to get info from another table when the selection in the first combo box changes.



    I see a lot of combo box examples in this forum but none of them access a different table each time the first combo box changes.

    any help would be appreciated.

    regards,
    ekmoorhead

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,320
    Having a second table wouldn't really change the method. As long as the value from the first combo can be used to filter the second table, either of the normal methods will work fine. The query or SQL would simply access the second table. I have a sample here:

    Baldy-Cascading Combos
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    More specifically, the first combo box makes a selection from a table. Then based on this selection the second combo box gets a table based on the first combo box selection. So the second combo box will each time change a table to get the information each time the first combo box changes selection. I want my second combo box to change table each time the first combo box selection changes.

    regards,
    ekmoorhead

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,320
    Suspicious design, but still not a problem. Instead of using the first combo for the criteria, you use for the FROM clause (using the technique that builds SQL).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    alansidman's Avatar
    alansidman is offline Life @ 7100'
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,459
    Essentially, Paul has given you the most efficient way to do this, but in the interest of giving you what you have asked for specifically, look at the first example in this link

    http://www.fontstuff.com/access/acctut10.htm

    Alan


    Edit: @Paul--do you use a smart phone or tablet (ipad)? If so, you might be interested in this app Vivino. Its a free one.

    https://itunes.apple.com/us/app/vivi...414461255?mt=8

  6. #6
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    I use access 2010. How do I input the code you provided in my second combo box?

    regards
    ekmoorhead

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,320
    Quote Originally Posted by alansidman View Post
    Edit: @Paul--do you use a smart phone or tablet (ipad)? If so, you might be interested in this app Vivino. Its a free one.

    https://itunes.apple.com/us/app/vivi...414461255?mt=8
    Thanks Alan! I have both, and have been using a similar product for some time called Drync Wine I think. My wino wife and I have quite a few wines recorded in it. It's very handy, as neither of us can remember what we liked/disliked. :/
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 06-26-2012, 07:23 AM
  2. Replies: 1
    Last Post: 06-25-2012, 02:22 PM
  3. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  4. Dynamic Cascading Combo Box
    By Userdd in forum Forms
    Replies: 5
    Last Post: 07-24-2011, 07:37 PM
  5. Replies: 1
    Last Post: 05-25-2011, 08:37 AM

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 - Senior Forums