Hello
Which is the most appropriate ComboBox1 Event to show a message that combobox1.item Does not Exists
ie user types wrong string/text in Combobox1 and Msg to POP up "Item Not there in the List"
a.) Typing few characters in Combobox1 and Msgbox Poping up OR
b.) Typing full string/Text (Wrong Entry itself) then Msgbox Poping up
preferable choice would be Option a.)
Almost explored everything but somehow could not succeed
Do we have something like
or any different syntax
for whole coding you may refer my thread 892141 in this forum
Thanks
SamD
Thread 3: 892182
18
Which is the most appropriate ComboBox1 Event to show a message that combobox1.item Does not Exists
ie user types wrong string/text in Combobox1 and Msg to POP up "Item Not there in the List"
a.) Typing few characters in Combobox1 and Msgbox Poping up OR
b.) Typing full string/Text (Wrong Entry itself) then Msgbox Poping up
preferable choice would be Option a.)
Code:
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
Textbox1.Text = dt.Rows(Combobox1.SelectedIndex).Item(1)
Textbox1.Update 'Updates the textbox
End Sub
Code:
If ComboBox1.Items.Contains(ComboBox1.Text) Then
Else
MsgBox "Item Not there in the list"
End if
Do we have something like
Code:
If Not ComboBox1.Items.Contains(ComboBox1.Text) then
MsgBox "Item Not there in the list"
End if
for whole coding you may refer my thread 892141 in this forum
Thanks
SamD
Thread 3: 892182
18