Hi Pritam,
This is an excellent question and I decided to add it to my book in the "Best of the Forum" section. Thanks!
You need to use the Split() function to split the string into an array. And then us the In operator to test if the field in is the array. Here is an example:
CStr({Customer.Customer ID},"#") IN Split({?Customers},",");
There is two important things to be aware of: I converted the number to a string using CStr() because the Split() function returns an array of strings. If the data field is a string, then you don't have to use this function at all. The second thing is that IF you are converting it to a number, then the Cstr() function has to return the number without any decimals in it. That is why I used "#" as the second parameter for the CStr() function.
Oh yeah - the user shouldn't put quotes around the individual items. Just separate them with commas like:
1, 5, 7
I hope this helps. Now I need to go write this up for the book!
Edited by BrianBischof - 31 Jul 2007 at 10:01am