gabrielsoy
New member
- Local time
- Today, 16:42
- Joined
- Sep 22, 2008
- Messages
- 2
In a query I have a field where I concatenate the contents of other text fields. I prompt the user for a Search string (can be one, or several words), and I want to do a search in that concatenated field, so that I find records with the most words from the user's input.
Example:
I have the following fields:
1-"Space bar try our special margaritas, wine vodka, cigars"
2-"Bar Don Pepe. Wine, vino, cigars, cognac"
3-"Our bar. Cocktails. margaritas, wine"
If the user enters "wine, Pepe", he will fist get field 2 (both wine and Pepe are there), then 1 and then 3 (bar).
If the user enters "bar, cigars" he will get fields 1 & 3, then 2 (bar).
I have though if the user input is only one word, I could use it as criterium and see which fields contain it. But I dont know what to do if the user enters two words, or three, or ten...
Anybody can help?
Thanks, a million.
Example:
I have the following fields:
1-"Space bar try our special margaritas, wine vodka, cigars"
2-"Bar Don Pepe. Wine, vino, cigars, cognac"
3-"Our bar. Cocktails. margaritas, wine"
If the user enters "wine, Pepe", he will fist get field 2 (both wine and Pepe are there), then 1 and then 3 (bar).
If the user enters "bar, cigars" he will get fields 1 & 3, then 2 (bar).
I have though if the user input is only one word, I could use it as criterium and see which fields contain it. But I dont know what to do if the user enters two words, or three, or ten...
Anybody can help?
Thanks, a million.