July 31st, 2000, 10:41 PM
I can't seem to find this anywhere. Can someone please give me an explanation of all the parameters required in the Find function of an ADO recordset?
Find (criteria, SkipRows, searchDirection, start)
I know criteria is a search string, that's all. I do not know how to utilise the others. My problem is that if I only supply the criteria, it will only know how to search forward from the current position. I need it to restart again from the beginning, and I would prefer not to have to use .movefirst as it might conflict with some other part of my coding.
My code so far:
Private Sub cboAgentCode_Change()
On Error GoTo NotFoundErr
Dim x As String
x = "intAgentCode = " & cboAgentCode.Text
datAgent.Recordset.Find (x)
Exit Sub
NotFoundErr:
MsgBox Err.Description
End Sub
Find (criteria, SkipRows, searchDirection, start)
I know criteria is a search string, that's all. I do not know how to utilise the others. My problem is that if I only supply the criteria, it will only know how to search forward from the current position. I need it to restart again from the beginning, and I would prefer not to have to use .movefirst as it might conflict with some other part of my coding.
My code so far:
Private Sub cboAgentCode_Change()
On Error GoTo NotFoundErr
Dim x As String
x = "intAgentCode = " & cboAgentCode.Text
datAgent.Recordset.Find (x)
Exit Sub
NotFoundErr:
MsgBox Err.Description
End Sub