I have a table that has 4 fields with words in them.
I want to be able to enter key words to search through all of the fields.
I have 3 text boxes to enter search key words.
This is what I came up with
Code:
WHERE
(((LessonInformation.LongDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW1] & "*" And (LessonInformation.LongDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW2] & "*" And (LessonInformation.LongDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW3] & "*"))
OR (((LessonInformation.ShortDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW1] & "*" And (LessonInformation.ShortDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW2] & "*" And (LessonInformation.ShortDescription) Like "*" & [forms]![Home]![SearchByWord]![SKW3] & "*"))
OR (((MasterSpec.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW1] & "*" And (MasterSpec.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW2] & "*" And (MasterSpec.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW3] & "*"))
OR (((MasterSpec_1.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW1] & "*" And (MasterSpec_1.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW2] & "*" And (MasterSpec_1.Description) Like "*" & [forms]![Home]![SearchByWord]![SKW3] & "*"));
But this makes it so that the key words have to be in the same field...
Ex: field1: metal railing, field2: masonry
If I search for metal and masonry I will get no results
If I search for metal and railing I will get results
I think this is simple but I'm having a hard time coming up with an alternative.
Thanks!