PDA

Click to See Complete Forum and Search --> : ComboBox Problem


Chris 655321
Aug 10th, 2000, 08:28 AM
I'm trying to create a combo box with certain criteria...what I want to do is that once one of those criteria has been chosen, it opens a form that corresponds to that particular criteria...ie: the combo box reads height, it opens the form that is categorised by 'height'.

Dr_Evil
Aug 10th, 2000, 02:06 PM
This should give you an idea of how to accomplish this:

Private Sub Combo1_Click()
If Combo1.Text = "Item 1" Then
Form2.Show
End If

If Combo1.Text = "Item 2" Then
Form3.Show
End If

If Combo1.Text = "Item 3" Then
Form4.Show
End If

End Sub

-------------------------------------------------------

Private Sub Form_Load()
Combo1.AddItem "Item 1"
Combo1.AddItem "Item 2"
Combo1.AddItem "Item 3"
End Sub

Chris 655321
Aug 10th, 2000, 02:32 PM
WICKED. it worked. thanks.