D
Daniel Hill
OK, I have very, VERY basic background knowledge of VB6
and have now upgraded to VB.NET and now I'm struggling to
bring up the forms I want.
What I am looking to do is to have a click a command
button bring up a form, and to have which form is brought
up determined by which item is selected in the
accompanying combo box.
I've gathered that you have to declare the item as a
variable and when you want to call up that you use
Combobox1.valuemember = variable1
And then you can do what you like with it.
However my problem comes when I use more than one
variable (as you do with combo boxes).
It seems that no matter what I do:
Private Sub Butselect_Click_1(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ButSelect.Click
CmbCharacters.ValueMember = item1
frm2.Close()
frm1.Show()
Me.Hide()
CmbCharacters.ValueMember = item2
frm1.Close()
frm2.Show()
Me.Hide()
Or put it in a Select Case or If statement I can't get it
to show the right form.
In this example both result in frm2 being shown.
I just don't get it. Any help would be greatly
appreciated.
and have now upgraded to VB.NET and now I'm struggling to
bring up the forms I want.
What I am looking to do is to have a click a command
button bring up a form, and to have which form is brought
up determined by which item is selected in the
accompanying combo box.
I've gathered that you have to declare the item as a
variable and when you want to call up that you use
Combobox1.valuemember = variable1
And then you can do what you like with it.
However my problem comes when I use more than one
variable (as you do with combo boxes).
It seems that no matter what I do:
Private Sub Butselect_Click_1(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ButSelect.Click
CmbCharacters.ValueMember = item1
frm2.Close()
frm1.Show()
Me.Hide()
CmbCharacters.ValueMember = item2
frm1.Close()
frm2.Show()
Me.Hide()
Or put it in a Select Case or If statement I can't get it
to show the right form.
In this example both result in frm2 being shown.
I just don't get it. Any help would be greatly
appreciated.