Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting a Winner
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00226460
Message ID:
00226498
Views:
25
I'd build some type of form that lists the entrant and shows it as sort of a race with a progress bar for each entrant. I would build a loop that picks an entrant (using RAND() -> see Help; use a negative number initially outside the loop and then use with no argument in the loop). I would keep selecting entrants until they one is picked "some magical number" of times. Update an entrants progress bar when they are selected. When someone get to "some magical number", the progress bar should be full and a Winner picture will pop-up beside that entrant. You can determine the "some magical number" by setting the form up and trying different numbers. I think you want the process to take an average amount of time that will make it exciting/tense (ie. long enough) but not to the point where people lose interest (ie. too long).

Thats what I'd do...it might make it a little more fun.

Joe


>Our company is creating a sweepstakes application that will randomly select a winner each month. We are having difficulty putting code together that will help us select a winner. We are using one table that has two fields in it. A three letter code (AFS) field and a dateime field. Does anyone have any simple code that might be helpful in selecting a winner or have any ideas on how to generate a winner.
>
>Thanks in advance
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Reply
Map
View

Click here to load this message in the networking platform