ioncila
08-13-2012, 07:22 AM
Hi
First of all, this is a crosspost
http://www.ozgrid.com/forum/showthread.php?t=168597
And I am very sorry for that.
But I really need an urgent help in this and I didnt get any suggestions lately in that forum.
Here's my issue:
Hi
I'm have a form1 with several textboxes (textbox1, textbox2,...) and another form2 with comboboxes (combobox1, combobox2,...).
What I'm trying to do is:
Click in textbox1, open form2, enable combobox1, disable or lock other comboboxes
Click in textbox2, open form2, enable combobox2, disable or lock other comboboxes
and so on...
The code below works if I set it for just one combo in the change event. If I set for every combo, it locks all combos in form2
Private Sub ComboBox1_Change()
If Me.ComboBox1.ListIndex > -1 Then
Me.ComboBox2.Enabled = False
Me.ComboBox3.Enabled = False
End If
End Sub
How do I change code to work as I want?
Once again I apologize for this crosspost
Thank you very much in advance
Ioncila
First of all, this is a crosspost
http://www.ozgrid.com/forum/showthread.php?t=168597
And I am very sorry for that.
But I really need an urgent help in this and I didnt get any suggestions lately in that forum.
Here's my issue:
Hi
I'm have a form1 with several textboxes (textbox1, textbox2,...) and another form2 with comboboxes (combobox1, combobox2,...).
What I'm trying to do is:
Click in textbox1, open form2, enable combobox1, disable or lock other comboboxes
Click in textbox2, open form2, enable combobox2, disable or lock other comboboxes
and so on...
The code below works if I set it for just one combo in the change event. If I set for every combo, it locks all combos in form2
Private Sub ComboBox1_Change()
If Me.ComboBox1.ListIndex > -1 Then
Me.ComboBox2.Enabled = False
Me.ComboBox3.Enabled = False
End If
End Sub
How do I change code to work as I want?
Once again I apologize for this crosspost
Thank you very much in advance
Ioncila