Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced search function

Status
Not open for further replies.

tommeekers

Programmer
Sep 10, 2003
77
0
0
BE
Hi,

I'm looking for the best way to implement an advanced search function into my application.

Right now I have my main form which has one text field, a search button and a subform. The subform shows the contents of MyTable in datasheet view. When the user enters something into the textfield and then presses the search button, I just change the source of the subform to another form which is based on a query. This query shows the exact same fields in datasheet view but has some criteria added to one field Like "*" & Forms![MyForm]![MySearchField] & "*".

I would like to expand this search function so that ALL fields can be searched (or at least more than one) and also wildcards can be used. For example when I search for %hello% it would return all records with the word hello in it, but when I search for hello% I only want those records which begin with hello. Of course I will also have to specify somewhere which fields I want to search.

How would I best handle this ? Are there any examples I can use ??
 
Check out this thread. This allows a keyword(s) to be searched through all the fields on the form.

thread702-1213703
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top