D
Dave
How do I initialize the random number function to return different random
numbers for each Access session?
Thank you
Dave
numbers for each Access session?
Thank you
Dave
Dave said:How do I initialize the random number function to return different random
numbers for each Access session?
Dave said:This is the code that runs when a form is opened:
Public Function RndNum(vIgnore As Variant) As Double
Static bRnd As Boolean
If Not bRnd Then
'Initialize the random number generator once only
bRnd = True
Randomize
End If
RndNum = Rnd()
End Function
This query is then run:
SELECT Table1.Num, Rnd([Num]) AS RndNo
FROM Table1;
But every time I open a new session the same random numbers appera for each
Num.