Searching for Keyword

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Help

Like "*shirt*"
This expression searched the database for the word Shirt in the description.
I would like the user to be prompted for which word to use in the search.

Thanks
Paul
 
Paul,

Not much in the way of details here on how you are doing the
search. If you would like to prompt them with an inputbox
you could do something like this for the prompting and
string building.

Dim strSearch as String

strSearch = InputBox("Enter your search word")
strSearch = "*" & strSearch & "*"

Gary Miller
Sisters, OR
 
Paul said:
Like "*shirt*"
This expression searched the database for the word Shirt in the description.
I would like the user to be prompted for which word to use in the search.

In the query criteria use:

Like "*" & [Please enter your search word] & "*"

They will be prompted with:

Please enter your search word

Alternatively, you can use a search form and use this as a criteria:

Like "*" & [Forms]![TheFormName]![TextBoxName] & "*"

And the query with read from your open form.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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

Back
Top