Dynamically search multiple fields

steve21nj

Registered User.
Local time
Today, 16:31
Joined
Sep 11, 2012
Messages
260
I have previously worked with the link below on two other databases with great success. My company wanted to implement a search on another existing database but for some reason when I type characters in the Search For, it will not narrow down the results. I am using the exact same form, code, field names, just different query results.

The exisiting db has over 100k records, so i removed all but 5 test ones.

I'd like to search for everything in the list box: Property, Money, Medication, Additional, and Names.

Any suggestions?


http://www.access-programmers.co.uk/forums/showthread.php?t=188663
 

Attachments

You seem to have forgot to do this step as mentioned by Pete..

  1. Select all the field you want to search along with any other you want to appear in your search results.
  2. In the criteria for the first of the fields you wan to search put the following; Like "*" & [forms]![FRM_SearchMulti]![SrchText] & "*"
  3. Now for the next field you wish to search go down one row in the criteria (Or) and put the same code that we used in step 7.
After adding them, it filters.. so add the criteria under whichever fields you wish to have.. Like "*" & [forms]![FRM_SearchMulti]![SrchText] & "*"
 
Funny that you mention it. I just figured it out and was about to post back, I must be loosing my mind!

That leads me to my next question, do you know how to add a filter to search by two dates to that form?
 
Not exactly clear about your question.. Are you asking to search on Top of the search that Pete has provided or is it a separate function? It you want on top of it.. I am not sure.. but will give it a thought.. BUT, If it is separate, then create two unbound text box controls, and use the BETWEEN clause.. something like..
Code:
SELECT Detention.Key, Detention.[Last Name], Detention.[First Name], Detention.Age, Detention.[A-Number], Detention.[Date In]
FROM Detention
WHERE (((Detention.[Date In]) Between #01/01/2012# And Date()));
 

Users who are viewing this thread

Back
Top Bottom