Jamsandwich
New Member
- Joined
- Sep 25, 2014
- Messages
- 44
Hey guys,
I have a form with a text box that allows a user to input anything.
I'm using this text box as a parameter for a query.
So I'd like to return records that contain the input from the text box in a specified field.
I have put my required fields into the query and added the following criteria to the necessary field -
This doesn't appear to be returning anything at all though, no matter what is entered into the text box. Am I missing a step somewhere? Or is my criteria typed in wrong?
If nothing is entered or if I don't hit Enter upon typing on the box then the query returns all records.
For reference, here is the generated SQL
I have a form with a text box that allows a user to input anything.
I'm using this text box as a parameter for a query.
So I'd like to return records that contain the input from the text box in a specified field.
I have put my required fields into the query and added the following criteria to the necessary field -
Code:
Like "*" & [Forms]![frm_Reports]![txtpTitle] & "*"
This doesn't appear to be returning anything at all though, no matter what is entered into the text box. Am I missing a step somewhere? Or is my criteria typed in wrong?
If nothing is entered or if I don't hit Enter upon typing on the box then the query returns all records.
For reference, here is the generated SQL
Code:
SELECT Projects.p_ID, Projects.p_Title, Projects.p_Description, Projects.p_Department, Projects.[p_Project Lead],
Projects.p_Priority, Projects.p_Status
FROM Projects INNER JOIN Functions ON Projects.p_ID = Functions.f_pID
WHERE (((Projects.p_ID) Like "*" & [Forms]![frm_Reports]![txtpTitle] & "*"));