Keyword Seach in a Parameter Query

  • Thread starter Thread starter bpz
  • Start date Start date
B

bpz

Guest
I am a relatively novice access user with a question about a query I have built. The query is a parameter query that takes its query values from a form.

I have the query constructed at the moment so the user can search and any combination of fields using a date range, and three drop downs.

One of the fields in the table that I am querying is a text "Subject" field. I would like to add a keyword search upon this field into my existing query, as such I added a text box into my form, in which the user can type a keyword to search upon.

However, when I added the following criteria to the field in my query:
Like "*" & [Forms]![frm_find_log_entry]![Subject] & "*"
And then tried typing anything into my keyword search box on my form and run my query, I am returned with all results, rather than just results with the search words.

I have read a few strings on this subject. One from 2002 seemed to be on the right track but I was unable to understand it well enough to implement the suggested solution.

Any insight that could be provided on this subject would be greatly appreciated.

Thanks,
Benjamin
 
Hello Benjamin!

I think you made a mistake somwhere.
Look at "DemoSubjectA2000.mdb"
Open Form1 and try.
 

Attachments

MStef,
Thank you very much for the demo database. The language for your keyword query and the one I have are the same. I did successully set up a keyword search query (where subject was the only field with a parameter) independent of the larger parameter query I have, using the
Like "*" & [Forms]![frm_find_log_entry]![Subject] & "*"
criteria and it worked, however I would like to keep this criteria part of the larger query for the sake of simplicity.
 
Solution found!

I believe I have found a solution. I simply took the query language out of my first query for the subject field, then based a second query on my first query and used the criteria I have shown above for the subject field in my second query. This seems to be working exactly how I wanted it to.
MStef, thanks again for the reply, I hope this string can be helpful to someone.

-BZ
 

Users who are viewing this thread

Back
Top Bottom