Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Multiple combo boxes

Discussion in 'Information Technology' started by Jenn, Jul 28, 2006.

  1. Jenn

    Jenn
    Expand Collapse
    Guest

    I need to do the following in a database. I have a table that has values
    that populate a combo box and these values get stored in another table. For
    the example lets say these values in the combo lookup table are "fruits",
    "Veggies", and Junk Food". So I have a combo box on a form that is populated
    with these three values that the user can select from. What i want to do
    next is have a second combo box which will have a secondary selection. For
    instance, let's say the user selects "Veggies", I want the second combo box
    to populate with the selection "carrots", "peas", and "broccoli". If the
    user selects "Junk Food" in the first combo box I want the second combo box
    to have the selections "Pizza", "Chips" and "Cake".
    So how would I do this? I am assuming I need to set up a different look up
    table for the selection under "Fruits", and one for selections for "veggies"
    and one for "Junk Food". I just dont know how to get a 2nd combo box to 1)
    read what is going on with the first box and 2) how to get the second box to
    allow the correct selections.
    Any help would be greately appreciate!
    TIA!
     
  2. Loading...


  3. Svetlana

    Svetlana
    Expand Collapse
    Guest

    Change the rowsource of the second combobox to something like
    SELECT .........................................
    FROM ........................
    WHERE (((NameOfTable.NameOfField)=[Forms]![FormName]![cbo1]));
    Then on GotFocus event of the second combobox put the code
    cbo2.Requery
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page