drnew.Item("TYPE") = ComboBox1.Text.ToString
This doesnt add what the user put in the combo box.
Are you wanting to add to the same combo box that the user has selected
from? To add items to a combo box you need to use the add method of the
items collection...
combobox1.Items.Add("my string")
But when do you want to add to the combo box? After the user has finished
typing? Remember there is no way to know if the user has *finished* typing
as such unless you actually use a timer, which is a bit of a fudge. Maybe
check for the enter key being pressed in the keydown event?
Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If (e.KeyCode = Keys.Enter) Then
If (ComboBox1.FindStringExact(ComboBox1.Text) = -1) Then
Call ComboBox1.Items.Add(ComboBox1.Text)
End If
End If
End Sub
But then again I might have the wrong idea about what you want?
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\