Results 1 to 3 of 3
  1. #1
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48

    how to link 2 Combo box

    Hello there,



    I have 2 Combo box and try to link them:
    1. Combo box1, has a dropdown list as: A, B, C;
    2. Combo box2, has a dropdown list as: A1, A2, A3, B1, B2, B3, C1, C2, C3;

    I try to do this: when I chose A from dropdown list on Combo box1 , then the dropdown list on Combo box2 should only show: A1, A2, and A3.

    Please help me!

    Thanks,
    Cindy

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    what you are referring to is called ''cascading combos'

    look to the bottom of this thread where the same question as been asked before. But essentially the rowsource for combo2 should be

    Code:
    SELECT somefield FROM sometable WHERE left(somefield,1)=[combo1]
    and in the combo2 gotfocus event put

    Code:
    combo2.requery

    You also need to think about these situations

    - where combo1 has not been populated
    - where user changes the value selected in combo1 after they have selected a value in combo2

  3. #3
    cindyLiu is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2014
    Posts
    48
    Thank you very much, I got it!
    Cindy

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

Similar Threads

  1. combo box link to form
    By KAffleck in forum Forms
    Replies: 3
    Last Post: 04-03-2020, 06:40 AM
  2. I want to create a link combo box
    By Jeremy Sng in forum Access
    Replies: 4
    Last Post: 10-27-2016, 07:08 AM
  3. Replies: 1
    Last Post: 01-10-2013, 05:59 PM
  4. Replies: 3
    Last Post: 12-14-2012, 08:59 AM
  5. Please Help - Link combo boxes
    By anish in forum Forms
    Replies: 5
    Last Post: 04-10-2010, 02:58 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