searching with a like clause (1 Viewer)

JaredNJames

Registered User.
Local time
Today, 12:49
Joined
Jul 7, 2007
Messages
87
hi, is it possible to have a form where you enter a word in a text box and it searchs a table and brings up all records which match it, but it doesnt have to be an exact match.

e.g.
you enter : the

results : the car
the bike
etc.

any help appreciated.

jjames
 

freakazeud

AWF VIP
Local time
Today, 08:49
Joined
Sep 10, 2005
Messages
221
re:

Hi,
sure...use the like operator with wildcards in a query field's criteria area e.g.:

Like "*" & [Forms]![YourForm]![YourControl] & "*"

You could implement a subform on the main form which holds this search control where the subform is based on the query that uses this reference. On the after update event of the search control or an on click event of a button just requery the subform to reflect the query results.
HTH
Good luck
 

Users who are viewing this thread

Top Bottom