F
FBxiii
Hi. I am trying to get a Random number between 0 and 5 to appear on each row
of a query. I can get the same number on each row (it changes every time I
run the query) but cannot get a different random number for each row.
Basically, I want to create some Test data by adding the Random number to a
Received Date and then saving this new date as a Completed Date.
I have created a Module to generate a Random number:
Function Random_Number() As Integer
Randomize
Random_Number = Int(Rnd * 6)
End Function
Then, I call the function from a query:
Field = Number: Random_Number()
Can anyone tell me what I am doing wrong?
Cheers,
Steve.
of a query. I can get the same number on each row (it changes every time I
run the query) but cannot get a different random number for each row.
Basically, I want to create some Test data by adding the Random number to a
Received Date and then saving this new date as a Completed Date.
I have created a Module to generate a Random number:
Function Random_Number() As Integer
Randomize
Random_Number = Int(Rnd * 6)
End Function
Then, I call the function from a query:
Field = Number: Random_Number()
Can anyone tell me what I am doing wrong?
Cheers,
Steve.