We help IT Professionals succeed at work.

Create query criteria from a form plus wildcard

Fritz Paul
Fritz Paul asked
on
I want to create query criteria which is the combination of a wildcard * and contents of a control on a form.
What works as criteria is    
Like "*science*"
which results in all titles with science somewhere in the title.
Now I want to enter the word    science   or any other word in a control on a form and write the criteria to give the same result. The reference to the control is
[Forms]![Enquiries]![SearchQualTitles]
So what I need is something like
Like "* & [Forms]![Enquiries]![SearchQualTitles] & *"
How can I do that?
Comment
Watch Question

Top Expert 2016
Commented:
place this in the criteria of your query in the field you are filtering

Like "*" & [Forms]![Enquiries]![SearchQualTitles] & "*"

Author

Commented:
I thought I tried that and it did not work.

But it works fine now.

Don't know what I would have done without you.