R
rdi
I've got a combo-box of the drop-down style (not drop-down-list). The first item is "NHPI-Forms". If I type "NHPI-Forms" into the combo-box that string is supposedly not listed in the combo-box. While if I type "Personal" (which is the THIRD item in the list, it IS found. I'm using "FindStringExact" from the combo-box. WHat could be going on?
TIA
--
RDI
(remove the exclamation from the email address)
'This is performed as part of the initialization of the form
cbxAcctAcctList.Items.Add("NHPI-Forms")
cbxAcctAcctList.Items.Add("NHPI-AutoResponder")
cbxAcctAcctList.Items.Add("Personal")
'This is what happens if I type something into the combobox.
'If I type "NHPI-Forms", the FIRST portion of the IF statement occurs
'if I type "Personal", the SECOND portion of the IF statement occurs
Private Sub cbxAcctAcctList_NewText(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxAcctAcctList.TextChanged
If cbxAcctAcctList.FindStringExact(cbxAcctAcctList.Text) Then
BtnAcctRmv.Enabled = True
btnAcctMod.Enabled = True
btnAcctAdd.Enabled = False
Else
BtnAcctRmv.Enabled = False
btnAcctMod.Enabled = False
btnAcctAdd.Enabled = True
End If
End Sub
TIA
--
RDI
(remove the exclamation from the email address)
'This is performed as part of the initialization of the form
cbxAcctAcctList.Items.Add("NHPI-Forms")
cbxAcctAcctList.Items.Add("NHPI-AutoResponder")
cbxAcctAcctList.Items.Add("Personal")
'This is what happens if I type something into the combobox.
'If I type "NHPI-Forms", the FIRST portion of the IF statement occurs
'if I type "Personal", the SECOND portion of the IF statement occurs
Private Sub cbxAcctAcctList_NewText(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxAcctAcctList.TextChanged
If cbxAcctAcctList.FindStringExact(cbxAcctAcctList.Text) Then
BtnAcctRmv.Enabled = True
btnAcctMod.Enabled = True
btnAcctAdd.Enabled = False
Else
BtnAcctRmv.Enabled = False
btnAcctMod.Enabled = False
btnAcctAdd.Enabled = True
End If
End Sub