Text Box as criteria for query

  • Thread starter Thread starter pbudzik
  • Start date Start date
P

pbudzik

This is probably elementary, but is there a way to use the value in
text box to fill in the value in a Like criteria statement. Such a
Like "*[text box value]*". If so, I must have the syntax wrong
because I can't seem to get the value from the text box into th
query.

Thank you in advance, help would be greatly apprciate
 
Assuming the field that receives this criteria is a Text field, try:
Like "*" & [Forms]![SomeForm]![SomeTextbox] & "*"
 
in the query - LIKE "*" & Forms![My Form Name]![Text Box Name] & "*"

It will then "PULL" the text value into the criteria
 
in the query - LIKE "*" & Forms![My Form Name]![Text Box Name] & "*"

It will then "PULL" the text value into the criteri
 
Back
Top