Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query constraint that is "Like" the current value of a text box 1

Status
Not open for further replies.

osera

Technical User
May 15, 2006
35
US
This one has several of us stumped.

If I write my query constraint as *Test*, it will find any record where "Test" appears in the field in question.

If I write my constraint as [Forms]![Form1]![Combo0], it will find any record where the field is the same value as whatever is in Combo0.

My question, how do I combine the two of them? Is it possible to write a constraint that will find anything that is Like the current value of a combo or text box? For example, I want to search a list of projects for all that have been assigned to a particular person, whether that person is the only one assigned or part of a group. But I want to pick the name from a list instead of having to re-code the query for each name.

If there is an answer that will only work using SQL or VBA code, I'll take it.
 
Leslie,

Many thanks! I'm not sure how we managed to miss that since we tried just about every combination of using the '&' to concatenate the text sections.

I can now return to my disguise of the office miracle worker.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top