Results 1 to 3 of 3

Thread: combo box

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    TN
    Posts
    11

    Post


    "Select name,job from employee where number = 1"
    rs.MoveFirst

    While Not rs.EOF
    Combo1.AddItem rs(0)
    Combo2.AddItem rs(1)

    If I have more than 1 recordset returned, I populate the combo boxes.

    How---If I select combo1.list(1) how do I make combo2 automatically change to .list(1)?

  2. #2
    New Member
    Join Date
    Feb 2000
    Posts
    4

    Post

    The following event will take care of u r req.
    Private Sub combo1_Click()
    combo2.ListIndex = Combo1.ListIndex
    End sub

    Originally posted by smitty:

    "Select name,job from employee where number = 1"
    rs.MoveFirst

    While Not rs.EOF
    Combo1.AddItem rs(0)
    Combo2.AddItem rs(1)

    If I have more than 1 recordset returned, I populate the combo boxes.

    How---If I select combo1.list(1) how do I make combo2 automatically change to .list(1)?

  3. #3
    Member
    Join Date
    Oct 1999
    Location
    Snellville, GA, USA
    Posts
    38

    Post

    Here you go: make two combo boxes then click on combo1 to change 2.

    Private Sub Combo1_Click()
    Combo2.List(CInt(Combo1.ListIndex)) = Combo1.Text
    End Sub

    Private Sub Form_Load()
    Combo1.AddItem "A"
    Combo1.AddItem "B"
    Combo2.AddItem "C"
    Combo2.AddItem "D"
    End Sub

    -Elias

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width