Rano AH

Rano AH

  • NA
  • 176
  • 111.8k

IF condition for comboBoxes

Nov 5 2013 11:02 AM
Hi
I have four comboBoxes,

If I have the following case,
(ComboBox1.selectedItem=="ID" &&  comboBox1.Text=="ID"&&ComboBox1.enabled=true)||
(ComboBox2.selectedItem=="ID" &&  comboBox2.Text=="ID"&&ComboBox2.enabled=true)||
(ComboBox3.selectedItem=="ID" &&  comboBox3.Text=="ID"&&ComboBox3.enabled=true)||
(ComboBox4.selectedItem=="ID" &&  comboBox4.Text=="ID"&&ComboBox4.enabled=true
 then the application will continue. Otherwise a message box will be displayed saying that ID option must be selected first and the application will stop.

How to write this complex Condition? this condition needs to be checked when I click on "Start" button.

So, I expect that my application will not display the error message if at least one of the four comboBoxes has the selectedItem="ID" and the text="ID" and the combobox is enabled.



Answers (3)