I think things became a little unclear when it emerged the solution to the problem in access was the using af a primary key, which is not a random number by nature (but is unique!)
Surely the logic would be to generate a random number, and use a procedure to determine if that random number has been generated previously in the list. If not, its random and unique, otherwise generate the random number again.
I could do it with VBA, but as I have seen over my time on the board, there are some amazing formula people (like Aladin) who could probably generate something to do that with their eyes shut.