Put this code in a standard module (for example, mdlRandomizer).
Code:
Option Compare Database
Option Explicit
' Function NewRandom
'
' The input parameter can be any text or number field
' available to the query.
' The value of the parm itself is totally ignored, but it is there
' so that, in a query, the function will be called once for each
' record and therefore each record will be assigned
' a different random number between 0.0000 and 1.0000
'
'
Public Function NewRandom(ThisParmWillBeIgnored As Variant) As Single
Static AlreadyRandomized As Boolean
' The first call (only) will randomize the seed using
' the system time
If Not AlreadyRandomized Then
Randomize
AlreadyRandomized = True
End If
NewRandom = Rnd()
End Function