i have a question with the .RecordCount method...
I know the recordset returns more than one record...why is the RecordCount method returning a value of -1???? (during debugging) Any response would be greatly appreciated.
Thanks
-vza
Code:
Private Sub UsernameCombo_Change()
' Variables
Dim Partial As String
Dim i As Integer
' RecordSets
Dim rsSelect As New ADODB.Recordset
Partial = UsernameCombo.Text
If Partial <> "" Then
' Find closest stored value to Partial string variable
' Open RecordSets
rsSelect.Open "Select * From table Where Field1 Like '" & Partial & "%'", Cn, adOpenStatic
If rsSelect.EOF <> True Then
Partial = rsSelect!Field1
For i = 0 To rsSelect.RecordCount
If Partial <> UsernameCombo.List(i) Then
UsernameCombo.AddItem (Partial)
rsSelect.MoveNext
Else
Exit For
End If
Next i
End If
End Sub
I know the recordset returns more than one record...why is the RecordCount method returning a value of -1???? (during debugging) Any response would be greatly appreciated.
Thanks
-vza