You can make your function return the numbers in a string delimited by commas such as
1) ,132,142,156,
2) ,132,142,
3) ,132,
and use the InStr() function in the Where Clause of the query like this:-
SELECT ...........
FROM ...........
WHERE InStr(yourFunction(), "," & [yourFieldName] & ",");
.