jvcoach23
Centurion
I have a combo box.. wired up like this
to populate the combo
on the SelectionChangeCommited1 event.
the data coming to that query
looks like this
intTblPMCounterNameId vcCounterName
1 % Processor Time
4 % User Time
when I select % Processor Time, the selected value is 1 and the selected text is % User Time. When I select % User Time, intCounter is set to 4, that makes sense.. but the selectedtext gives me an error
can someone tell me what I'm doing wrong.
thanks
to populate the combo
Code:
With Me.cbCounter
.DisplayMember = "vcCounterName"
.ValueMember = "intTblPMCounterNameId"
.DataSource = wsPerfmon.spPMListing_CounterName(intCategory).Tables(0).DefaultView
End With
on the SelectionChangeCommited1 event.
Code:
intCounter = Me.cbCounter.SelectedValue
vcCounter = Me.cbCounter.SelectedText
the data coming to that query
looks like this
intTblPMCounterNameId vcCounterName
1 % Processor Time
4 % User Time
when I select % Processor Time, the selected value is 1 and the selected text is % User Time. When I select % User Time, intCounter is set to 4, that makes sense.. but the selectedtext gives me an error
Code:
Index and length must refer to a location within the string
thanks