Reputation: 886
I am using the code below to generate a random number :-
Dim LRandomNumber As Integer
LRandomNumber = Int((999 - 100 + 1) * Rnd + 100)
The code was taken from https://www.techonthenet.com/access/functions/numeric/rnd.php
However every time I run the code in MS Access, LRandomNumber = 734.
Am I using the code incorrectly, and if not, is the a better way to generate a random number between 1 and 1000?
Upvotes: 0
Views: 82