|
-
Nov 18th, 2000, 06:12 AM
#1
I do not understand SQL so i have turned to the InStr method of searching a field for text containing text that a user has entered. I need help because i created the loop and the program crashes every time due to my incorrect code structure. i know i have to use the following code:-
Private Sub cmdSearchBook_Click()
Dim SearchString As String
Dim result As String
SearchString = txtSearchBook.Text
Data1.Recordset.movefirst
Do
result = InStr(1, book, SearchString)
If result <> 0 Then Exit Do
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then Exit Do
Loop
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|