> I have an unbound text box on a form (It will be hidden) a typical value in
> the text box could be 1,3,4,5. I want to use this value as criteria in a
[quoted text clipped - 5 lines]
> text box the query will does not work. I have noticed that it works if only
> one number is in the text box.
Your parameter is returning the string
"1,3,4,5"
which means the query is searching for the value "1,3,4,5" instead of a
1 or a 3 or a 4 or a 5.
Each number can't be "seen" using the reference to the form's control,
because that is interpreted as one value instead of 4 values.
Here's the usual trick using InStr() in the criteria (SQL view):
SELECT...
FROM...
WHERE InStr("," & Forms!frm_Group_PickList!Result & "," , "," &
ColumnName & ",") > 0
Change "ColumnName" to the name of the criteria column.
What the InStr() function does is determine if the value of the
ColumnName is in the string returned by the reference to the form's
TextBox. If it is InStr() returns a value > 0, which causes the WHERE
clause to evaluate to True, which means that row is selected.

Signature
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Ant - 25 Mar 2006 22:18 GMT
Thanks, I'll have a go, I have been trying to solve this one all day!
>> I have an unbound text box on a form (It will be hidden) a typical value
>> in the text box could be 1,3,4,5. I want to use this value as criteria
[quoted text clipped - 32 lines]
> TextBox. If it is InStr() returns a value > 0, which causes the WHERE
> clause to evaluate to True, which means that row is selected.