Range of numbers

J

jllabelle

Hi,
I'm trying to do a query where I could enter the beginning number and
then the number of records I want after. i.e. Instead of saying between
61 and 100, I need "beginning at 61" and 40 more.

I tried "between [BeginningNumber] and [BeginningNumber] + [Insert
Range] but it doesn't work.

Is it doable?

Thanks
 
F

fredg

Hi,
I'm trying to do a query where I could enter the beginning number and
then the number of records I want after. i.e. Instead of saying between
61 and 100, I need "beginning at 61" and 40 more.

I tried "between [BeginningNumber] and [BeginningNumber] + [Insert
Range] but it doesn't work.

Is it doable?

Thanks

It will work if you first set the query Parameter dialog to the
datatypes expected.
In Query design view, click on Query + Parameters
Write:
[Beginning Number] (including the brackets) in the left panel, and
it's expected datatype (i.e. Long Integer if the criteria field is an
AutoNumber) in the right side.
Then do the same for [Insert Range].
Make sure the spelling is identical to the criteria.
 
K

KARL DEWEY

Try this --
Between Val([BeginningNumber]) And Val([BeginningNumber]) + Val([Insert
Range])
 
Top