WelshyWizard
IS-IT--Management
Hi all,
I have a combobox on a form that the user must make a selection from. It must not be left blank.
I fill the combobox list with the following code and also blank the text.
When the user hits the save button, I check if the ComboBox2.Text = "". If it does the user is notified that they must fill in the combobox. However, this is not working and when I actually check the ComoboBox2.text value it is taking the 1st value in the list.
What am I doing wrong? Is there a better way to go about this?
Cheers.
Today is the tomorrow you worried about yesterday - and all is well.....
I have a combobox on a form that the user must make a selection from. It must not be left blank.
I fill the combobox list with the following code and also blank the text.
Code:
SqlDataAdapter4.Fill(DsCat11)
ComboBox2.DataSource = DsCat11.Category1
ComboBox2.DisplayMember = "Cat1"
ComboBox2.Text = ""
When the user hits the save button, I check if the ComboBox2.Text = "". If it does the user is notified that they must fill in the combobox. However, this is not working and when I actually check the ComoboBox2.text value it is taking the 1st value in the list.
What am I doing wrong? Is there a better way to go about this?
Cheers.
Today is the tomorrow you worried about yesterday - and all is well.....