John said:
Tom,
I read in my book on Access that there is some command that is called
Randomize that is executed before the Rnd function. Is this necessary and,
if so, what is its purpose? Does it ensure that the result that is obtained
is truly as random as possible (instead of just getting the same result again
and again because the Rnd function has not been initialized) or what?
--John
John,
Randomize uses number to initialize the Rnd function's random-number
generator, giving it a new seed value. If you omit number, the value
returned by the system timer is used as the new seed value. If
Randomize is not used, the Rnd function (with no arguments) uses the
same number as a seed the first time it is called, and thereafter uses
the last generated number as a seed value.
Hope this helps.
Ken