Rusty
Apr 1st, 2000, 09:17 AM
I'm using ADO with access97 database file. I've read bits and pieces on the find command but I can only get it to work on a few fields. I would like to allow the user to select the field to search on, use wildcards, and the direction. I keep getting arguments are out of range.
S$ = Search.Combo1
SearchText$ = Search.Text1
fMainForm.TData1.Recordset.MoveFirst
fMainForm.TData2.Recordset.MoveFirst
fMainForm.TData1.Recordset.Find S$ & "Like" & "'" & SearchText$ & "*'"
If fMainForm.TData1.Recordset.EOF Then
MsgBox "Not Found", vbOKOnly
fMainForm.TData1.Recordset.MoveFirst
fMainForm.TData2.Recordset.MoveFirst
Else
MsgBox "Found", vbOKOnly
End If
The user selects the field from a combo control and then enters a search string.
Any help would be greatly appreciated,
Rusty
S$ = Search.Combo1
SearchText$ = Search.Text1
fMainForm.TData1.Recordset.MoveFirst
fMainForm.TData2.Recordset.MoveFirst
fMainForm.TData1.Recordset.Find S$ & "Like" & "'" & SearchText$ & "*'"
If fMainForm.TData1.Recordset.EOF Then
MsgBox "Not Found", vbOKOnly
fMainForm.TData1.Recordset.MoveFirst
fMainForm.TData2.Recordset.MoveFirst
Else
MsgBox "Found", vbOKOnly
End If
The user selects the field from a combo control and then enters a search string.
Any help would be greatly appreciated,
Rusty