J
Jerry
Hi
I am having a bad day. I wish to code the following for the input to a
combo box:
if nothing is typed in a combo box and no items in the drop down list of the
combo box are selected then a message box will show to warn the user.
I have tried various things - using
if ((cboSimple.Text == "") & (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") && (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") | (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") || (cboSimple.SelectedIndex == -1))
but none of these seem to work.
I just want to make sure that the user hasn't just selected nothing in the
cboSimple box.
thanks
Doug
I am having a bad day. I wish to code the following for the input to a
combo box:
if nothing is typed in a combo box and no items in the drop down list of the
combo box are selected then a message box will show to warn the user.
I have tried various things - using
if ((cboSimple.Text == "") & (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") && (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") | (cboSimple.SelectedIndex == -1))
if ((cboSimple.Text == "") || (cboSimple.SelectedIndex == -1))
but none of these seem to work.
I just want to make sure that the user hasn't just selected nothing in the
cboSimple box.
thanks
Doug