Random Numbers

S

Sue

I have a database for entries for a swimming gala. Once
I have received all the entries I need to allocate a
competitor number to each swimmer for each race by
putting them into a random order and then allocating the
numbers from 1 to however many swimmers there are in the
race. I need this number then to be saved in a separate
field. I would need to then allocate competitor numbers
to the next race in the same way randomly and again
starting from 1 to the number of competitors in the
race.

How can I get the database to sort the entries for each
race randomly and then allocate a number from 1 to the
maximum number for each race individually and get that
number to be saved in a field so that I can use it in the
future to sort on for each race in the programme etc.

Thanks

Sue
 
S

Scott McDaniel

Check the Randomize function in online help. It gives a good example of
generating random numbers.
 
S

Sue

maybe I'm being stupid but I can't find anything about
randomize functions in the online help that I can see. I
have tried going to web via the help file in access and
nothing relevant comes up with the search for randomize
function and I have also tried searching the knowledge
base but again nothing comes up with randomize function.
Could you please be a bit more specific with where this
example is.

Many thanks

Sue
 
J

John Vinson

maybe I'm being stupid but I can't find anything about
randomize functions in the online help that I can see. I
have tried going to web via the help file in access and
nothing relevant comes up with the search for randomize
function and I have also tried searching the knowledge
base but again nothing comes up with randomize function.
Could you please be a bit more specific with where this
example is.

Vexingly, Access Help is both badly indexed and compartmentalized. Try
opening the VBA editor (by typing alt-F11 or Ctrl-G) and *then* search
Help for Rnd (the random number function) and Randomize (a different
function which sets the random number seed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top