Good Afternoon,
I currently have a form based on a table in my database and wish to be able to search though it to find a specific record
The code I currently have is this:
Private Sub Command36_Click()
Dim searchtext
Dim searchcode
searchtext = txtsearch.Value
searchcode = [Text1].Value
If searchtext = searchcode Then
MsgBox "Search Complete"
Else
DoCmd.GoToRecord , , acNext
End If
Exit Sub
End Sub
This works fine with the exception of that I have to keep clicking the button to find the record i want. I have tried a loop but i have never used them before and must have done it wrong as it didn't work at all.
If anyone could make any suggestions it would be much appreciated
Thank you
Regards