R
Rob R. Ainscough
I know I must be going crazy, but for the life of me I can't figure out why
IndexOf is always returning -1?
With MyComboBox
.ValueMember = "Field1"
.DisplayMember = "Field2"
.DataSource = SomeDataTable
End With
MyIndex = MyComboBox.Items.IndexOf("myValue")
MyIndex is always -1, it never finds the value even though I've stepped thru
the Items and validated that "myValue" exists.
What am I missing?
Thanks, Rob.
IndexOf is always returning -1?
With MyComboBox
.ValueMember = "Field1"
.DisplayMember = "Field2"
.DataSource = SomeDataTable
End With
MyIndex = MyComboBox.Items.IndexOf("myValue")
MyIndex is always -1, it never finds the value even though I've stepped thru
the Items and validated that "myValue" exists.
What am I missing?
Thanks, Rob.