Parameter to Query

orna

Registered User.
Local time
Today, 17:47
Joined
Oct 13, 2002
Messages
78
Hi everyone

I have a query. The parameter to this query is forms!FromName!Field
that contains a number. The value is built from code. Now I want to use this query to retrieve more then a number like: 1 or 2 or 3
In this case no record is retrieved, if I take the string from the field
(1 or 2 or 3) and put it instead of forms!..... it works fine.
How can it be done????
:confused:
Thanks
 
Use a multiselect listbox on your form to select which numbers you would like to use in your criteria.

Concatenate each listitem selected into a string as such: IN (1, 2, 3)

Use this string in the where clause of your SQL statement

..... WHERE number IN (1, 2, 3)
 
Thanks !!!
:)
 

Users who are viewing this thread

Back
Top Bottom