D
David Bowman
Sure I was trying to do the same thing.
The solution I came up with is not that elegant.
<Is that the Microsoft Way?>
Setup the first combo box the way you want it.
<combo box1>
<Command Button>
<Combo Box 2>
So you choose something in the first list box, Click the
Button (Lame I Know) then your second Combo Box gets to
have the right stuff in it.
I was trying to name the Sub ("Sub ComboBox1_Click()") so
the code would actually execute when someone clicked on
it <ComboBox1> but It did not seem to work.
Can you make the following code execute _every_ time
someone touches ComboBox1????????
Please post how...
Sub CommandButton1_Click()
' Sets FormPage equal to the page (P.2)
Set FormPage = Item.GetInspector.ModifiedFormPages
("P.2")
' Sets Control to a ListBox called ComboBox1.
Set Control = FormPage.Controls("ComboBox1")
' Read what they picked as a choice for main category
mycat = FormPage.Controls("ComboBox1")
' Real time message for TESTING....
MsgBox "Your varible mycat has the following data in
it " & mycat
' Assign values to the new Combobox2
Set Control = FormPage.Controls("ComboBox2")
If mycat = "01 GEN REQUIREMENTS" then
Control.PossibleValues = "Blue;Green;Red;Yellow"
End If
If mycat <> "01 GEN REQUIREMENTS" then
Control.PossibleValues
= "Big;bigger;biggest;shit"
End If
end sub
The solution I came up with is not that elegant.
<Is that the Microsoft Way?>
Setup the first combo box the way you want it.
<combo box1>
<Command Button>
<Combo Box 2>
So you choose something in the first list box, Click the
Button (Lame I Know) then your second Combo Box gets to
have the right stuff in it.
I was trying to name the Sub ("Sub ComboBox1_Click()") so
the code would actually execute when someone clicked on
it <ComboBox1> but It did not seem to work.
Can you make the following code execute _every_ time
someone touches ComboBox1????????
Please post how...
Sub CommandButton1_Click()
' Sets FormPage equal to the page (P.2)
Set FormPage = Item.GetInspector.ModifiedFormPages
("P.2")
' Sets Control to a ListBox called ComboBox1.
Set Control = FormPage.Controls("ComboBox1")
' Read what they picked as a choice for main category
mycat = FormPage.Controls("ComboBox1")
' Real time message for TESTING....
MsgBox "Your varible mycat has the following data in
it " & mycat
' Assign values to the new Combobox2
Set Control = FormPage.Controls("ComboBox2")
If mycat = "01 GEN REQUIREMENTS" then
Control.PossibleValues = "Blue;Green;Red;Yellow"
End If
If mycat <> "01 GEN REQUIREMENTS" then
Control.PossibleValues
= "Big;bigger;biggest;shit"
End If
end sub