PDA

Click to See Complete Forum and Search --> : Random Record Sweepstakes


ausmoran
Sep 7th, 2000, 12:53 PM
I have an Access data file in which there is a table with records consisting of names and random ID numbers. I would like to have a form with a command button on it. We are going to use this for a sweepstakes...I'd like to be able to click on the command button and for the audience to see names scrolling through the form...after a thirty seconds, or so, it would simply stop scrolling and land on a name (this would be the winner).

I've been working on this for a while without success. Any help you might be able to provide would be GRATEFULLY appreciate.

Thanks,
Austin

JHausmann
Sep 7th, 2000, 01:24 PM
I'll write it for you as long as it randomly but always selects me as the winner. :)

What I'd do, if I were you is assign each name an autonumber value (a long integer, assigned by the database) and use that as the load key into a list (or combo) box, where the autonumber = listindex value for any particular name. Then, it's a simple matter of randomly generating a valid listindex value and setting it programmatically (which you'd do for a certain amount of ticks)...