Criteria for Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Currently, I have the below code to retrieve multiple Numbers from a table.
But I have to type in each number, like 1,2,3,4,5.
InStr([Number separated by commas no space],[tbl].[Number])

Does someone know how I can get the same result but only type in the begin
number and ending number, then it retrieve all numbers in that range like 1,5?
All my numbers happen to be an increment of 1.

Thanks
 
Currently, I have the below code to retrieve multiple Numbers from a table.
But I have to type in each number, like 1,2,3,4,5.
InStr([Number separated by commas no space],[tbl].[Number])

Does someone know how I can get the same result but only type in the begin
number and ending number, then it retrieve all numbers in that range like 1,5?
All my numbers happen to be an increment of 1.

Thanks

Use a criterion of

BETWEEN [Start of range:] AND [End of range:]

If the user types 1 and 5, you'll get 1,2,3,4,5.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top