I have a query where I have two conditions (criteria). One field is boolean and it is set to True, and it works. The other is Short Text. In the query design I am trying to use a Tempvars variable in the criteria "field" which originates from a user inputbox. I have tried, in the criteria field, the following:
[TempVars]![ShelterName] (I spelled out the whole name correctly)
Like [TempVars]![ShelterName] (I just spelled part of the name)
Like "*" & [TempVars]![ShelterName] & "*". (This works part of the time. I use this information to fill an Excel Spreadsheet, it doesn't always write, so the problem might be in my Excel Code. I will review that. )
If I put in an actual string, without any user input, such as Like "Foothill*". (it works).
I tried researching this in the forum and on google, but the solutions never covered using a variable as part of the criteria.
Any suggestions?
Jeff