Search Feature Help

G

Guest

Does anyone have a good approach to searching for a record
based on text entered in am unbound textbox? I have tried
to do this but can't quite seem to get it right?
 
M

Marshall Barton

Does anyone have a good approach to searching for a record
based on text entered in am unbound textbox? I have tried
to do this but can't quite seem to get it right?


In the same form? If so, then use code along these lines:

With Me.RecordsetColne
.FintFirst "somefield = """ & Me.unboundtextbox & """"
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With

You didn't explain how you want to activate the search so
I'm not sure where you would put that code. Most likely, it
would either go in the unbound text box's AfterUpdate event
or in the Click event of a search command button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top