how to generate a random number between 2 numbers

  • Thread starter Thread starter rob
  • Start date Start date
rob said:
using Access, between say 100025 and 986523

This is right out of the Access help:

Before calling Rnd, use the Randomize statement without an argument to
initialize the random-number generator with a seed based on the system
timer.
To produce random integers in a given range, use this formula:

Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Here, upperbound is the highest number in the range, and lowerbound is the
lowest number in the range.
 
-----Original Message-----



This is right out of the Access help:

Before calling Rnd, use the Randomize statement without an argument to
initialize the random-number generator with a seed based on the system
timer.
To produce random integers in a given range, use this formula:

Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Here, upperbound is the highest number in the range, and lowerbound is the
lowest number in the range.


.great, thanks alot~ cheers rob
 
Back
Top