Having records sort randomly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a a report/form to print out with contestants that are in specific
groups, but I need the report to place them randomly on the sheet so the
names will never be in a specific order. Any help will be appreciated.

Thanks!!
 
Tay J. said:
I have a a report/form to print out with contestants
that are in specific groups, but I need the report to
place them randomly on the sheet so the names
will never be in a specific order. Any help will be
appreciated.

Create a Public Function that returns a Pseudo-Random Number, and pass in a
Field from your Query, even though you aren't going to use it (that prevents
the Jet database engine from 'being smart', running the function only once,
saving the result and putting the same result into every record). Sort on
that Field in the Query. If you want it closer to "really random" then you
can use the Randomize function to initialize the random-number generator
before running the Query. Use the Rnd function in the Public Function to
retrieve a random number.

Larry Linson
Microsoft Access MVP
 
I will have to admit I am somwhat new to access so could youpossibly provide
an example of how to do this? or can I send you information from my databse
to make it easier?

Tay
 
Back
Top