T
Tami
The following was used in a query to scramble the records and reassign a new
number. The problem is, it did it in decimal format ex: 1.243565454 and I
cannot figure out how to change it to a single digit. I would like it to
start with the number 1 and then continue without skipping numbers. So if I
have a hundred records it would start at 1 and end at 100. Can I change the
format in the Shuffle: RndNum([fieldname]) field?
Public Function RndNum(vIgnore As Variant) As Double
number. The problem is, it did it in decimal format ex: 1.243565454 and I
cannot figure out how to change it to a single digit. I would like it to
start with the number 1 and then continue without skipping numbers. So if I
have a hundred records it would start at 1 and end at 100. Can I change the
format in the Shuffle: RndNum([fieldname]) field?
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
Then add a calculated field to your Query by typing
Shuffle: RndNum([fieldname])