That only changes it a little. Add a space after the
commas:
WHERE ", " & Forms!Form1!Text1 & ", " LIKE "*, " &
FieldName & ". *"
The important point here is that the list in the text box
must have the exact punctuation alowed for in the comparison
expression.
Because the check for punctuation is used instead of just
the field, the criteria will not be able to take advantage
of any indexing, which may have signifiicant performance
impact.
Be sure you understand that using the punctuation in the
expression is there to prevent a field with a value like
AU21 from matching a list like XAU2156
No spaces? It will always look like this:
BAU214, BAU324, BAU444
It will have the value, comma, space.
Does that change anything?
:
Then use Giorgio's idea.
To prevent matching just part of the specified values, use a
variation something like:
SELECT *
FROM Table1
WHERE "," & Forms!Form1!Text1 & "," LIKE "*," & FieldName &
".*"
And make sure there are no spaces in the list in the text
box.
rml wrote:
No, it could be CAU34, BAU44, AVC67
I just want to be able to have the data in this field populate a query that
would return the records (if any) for those entered in that field.
:
rml wrote:
How do I get records returned with the following:
Like[BAU214, BAU215, BAU216]
I would like to have all three records returned in the query.
Like "BAU21[456]"
or if the values are ot that uniform:
IN("BAU214", "BAU215"," BAU216")