Random Generator

shark70

Registered User.
Local time
Today, 19:23
Joined
Sep 12, 2004
Messages
13
Hi

I need to set up a Random Generator to select random account numbers for weekly competitions
I have a table with just the account numbers.

There can be anything between 10 and 500,000 account numbers depending on the competition and there can be either one winner or multiple winners

Can anyone help please?

Shark70
 
Function you'll need.
- Rnd - returns a 'random' number from the seed (randomize) between 0 and 1
- Randomize - initializes

You'd probably need to get all the Account numbers in a list/array/table/query. Store the maximum number of them into a variable.

Then multiply that maximum value against the result of the RND function, move to that place in the array/etc and print/store it or do whatever you need to with it. You also may want to flag it as picked, so that if by random chance it turns up again you/the system knows its already picked and gets the next random number.


Vince
 

Users who are viewing this thread

Back
Top Bottom