Multiple Combo Box Selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Orbie
    New Member
    • Nov 2009
    • 7

    Multiple Combo Box Selection

    Hey Guys,
    I'm new to VB.NET and looking for some help with combo boxes. I was wondering if it is possible to link 2 combo boxes to each other based on user selection?

    Example:
    Table 1 - Dept
    Dept ID (PK)
    Dept Name
    Section ID

    Table 2 - Section
    Section ID (PK)
    Section Name

    If the user selects Dept Name "Bakery" from the first combo box the second combo box should fill with the appropriate Section Name i.e. "Bread", "Cakes" etc...

    I am using VS2008 and the DB is SQL Server 2008. Both combo boxes are currently bound to the above Tables and displaying all Dept and Section Names.

    Any help would be appreciated.

    Thanks,

    Orbie.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You need to write a method that handles the SelectedIndexCh anged Event for the first ComboBox.

    From there you can determine what was selected in order to populate the second ComboBox.

    -Frinny

    Comment

    • DanicaDear
      Contributor
      • Sep 2009
      • 269

      #3
      Orbie,
      I'm really probably the last person you'd want helping you on a DB (lol) but I posted a similar question and I think my reply might help you. Check it out if you'd like.

      Comment

      Working...