Hello,
I have a form with a text box ([text2]) on it where I have code that creates the following text from selections from a list box:
Like "*Maumelle Lake*" Or Like "*Stewardship*"
I have a query that is supposed to select records based on that box ([text2]). The sql code looks like this:
PARAMETERS [Forms]![frmLocateDocs]![Text2].[value] Text ( 255 );
SELECT tblScannedImages.DocID, tblScannedImages.Description, tblScannedImages.Tags
FROM tblScannedImages
WHERE (((tblScannedImages.Tags)=[Forms]![frmLocateDocs]![Text2]));
When I run it referencing the text box I get no results, however when I paste the contents of [text2] in the criteria, I get results.
I have also reformatted my code to create this string in my [text2]:
(tblScannedImages.Tags) Like "*Maumelle Lake*" Or (tblScannedImages.Tags) Like "*Stewardship*"
When I paste this into my query criteria I get the desired results, however when I reference [text2], again, no results.
It does not seem to matter if I put [Forms]![frmLocateDocs]![Text2].[value] vs [Forms]![frmLocateDocs]![Text2] vs [Forms]![frmLocateDocs]![Text2].[value] in the criteria field.
Any input you have would be helpful.
:banghead:
Thanks,
LisaLu
I have a form with a text box ([text2]) on it where I have code that creates the following text from selections from a list box:
Like "*Maumelle Lake*" Or Like "*Stewardship*"
I have a query that is supposed to select records based on that box ([text2]). The sql code looks like this:
PARAMETERS [Forms]![frmLocateDocs]![Text2].[value] Text ( 255 );
SELECT tblScannedImages.DocID, tblScannedImages.Description, tblScannedImages.Tags
FROM tblScannedImages
WHERE (((tblScannedImages.Tags)=[Forms]![frmLocateDocs]![Text2]));
When I run it referencing the text box I get no results, however when I paste the contents of [text2] in the criteria, I get results.
I have also reformatted my code to create this string in my [text2]:
(tblScannedImages.Tags) Like "*Maumelle Lake*" Or (tblScannedImages.Tags) Like "*Stewardship*"
When I paste this into my query criteria I get the desired results, however when I reference [text2], again, no results.
It does not seem to matter if I put [Forms]![frmLocateDocs]![Text2].[value] vs [Forms]![frmLocateDocs]![Text2] vs [Forms]![frmLocateDocs]![Text2].[value] in the criteria field.
Any input you have would be helpful.
:banghead:
Thanks,
LisaLu