Text Searching

jk12

Always getting problems.
Local time
Today, 20:16
Joined
Feb 16, 2006
Messages
91
Hi all. Having searched on here and found many examples for search forms, I still can't find one that will do what i'm after. What i'm trying to do is have my user enter some search criteria which will show associated results for materials and the codes assigned to them.

This was easier enough to find a solution for. My problem is that this is only working for 90% of the time.

E.g.
User enters material description as "Type 1" they get the following results
Recycled Type 1 Sub-Base 3/14/11
Type 1 Sub-Base 3/14/10
If they enter "Crushed" they get
Crushed Concrete 3/14/12
However if they enter Type 1 Crushed (which is a valid material) they get nothing shown. I would have expected the results to have shown all the "Type 1" and "Crushed" results so that they could then select the best fitting description.

Is there anyway to have a search form operate in this manner so any record that contains any of the entered criteria will be shown?

Thanks
 
Yes it is possible especially if you don't mind getting involved with VBA code.

You just need to analyse the input box contents and make sure you configure the search query correctly.

If you want to get all the "Type 1" and all the "Crushed" from inputting "Type 1 Crushed" the WHERE clause of your query would have to be something like "WHERE Material like "*Type1*" OR Material like "*Crushed*"

Hope this helps
 
Using VBA is fine by me. Can see where your going with the suggestion, however how would I change the code so that it runs on whatever is entered into a text box
 

Users who are viewing this thread

Back
Top Bottom