multiple keywords

G

Guest

Hi, I have a table that contains a comments field among others. I am wanting
to set up a form with one text box that will allow me to enter multiple
keywords to perform a seach, similar to a search engine search where you
could put +cut +dog etc. I can do it ok with one keyword, or by having
multiple text boxes with one word in each but i'm wanting to know if it is
possible just to have one text box and multiple words in that box? Any ideas
appreciated.
 
T

Tom Ellison

Dear Sam:

Setting up whatever rules you want to use to parse the value the user
puts in the text box, build the SQL in code to search for that
according to those rules. Maybe this sounds too obvious and not
simple, but I recommend that's the way to do this.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
G

Guest

I was afraid you would say that... I was thinking the same but hopeful there
might be an easier way.... but thanks for the reply.
 
G

Guest

Hi sam,

Could you tell me how you got the search on one word to work? I can get the
query to select all the words in a text box but I'm pulling my hair out
trying to get a query to search one keyword out of the comments that are in
it.

Thanks

Misty
 
J

John Spencer (MVP)

Use wildcards and the like operator.

In the query grid:
Field: SomeMemoOrTextField
Criteria: LIKE "*" & [What Word?] & "*"

That will prompt you for a word and will find all records where that word
exists. Warning: If you enter "ear", it will find ear, wear, pear, and other
words that contain ear.
 
R

Robert Holloway via AccessMonster.com

This is exactly what I was looking for. Something so simple but jsut could
not getit to work unitl I saw it here
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top