|
-
Feb 21st, 2000, 10:34 AM
#1
Thread Starter
New Member
"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)?
-
Feb 21st, 2000, 11:33 AM
#2
New Member
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)?
-
Feb 21st, 2000, 11:50 AM
#3
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|