jasonsalas
IS-IT--Management
Hi everyone,
I'm working on an online contest that will be database-driven with Access. The structure will be such that the DB app will be able to take a series of contestant entries, from a drop-down menu, and filter out the resultant recordset to include only those records where the correct choice was selected.
For example:
"SELECT * FROM tblContestants WHERE Response= '" & Tiger Woods "'"
At least that's the easy part. What I'd like to do is be able to have the app automatically select a record from the aforementioned extracted recordset AT RANDOM, and return only that. This will be the winning contestant for the week.
I'm hoping that the VBScript RANDOMIZE function is the best way to go about doing this. Do you know if the Randomize function can be applied towards a range of records? Because I won't know at design-time how many entries we'll have at any given time, I'm thinking I should write something like:
For i=0 to i -1
to iterate through the collection of winning records and then select a single.
Hmmm.....
I'm working on an online contest that will be database-driven with Access. The structure will be such that the DB app will be able to take a series of contestant entries, from a drop-down menu, and filter out the resultant recordset to include only those records where the correct choice was selected.
For example:
"SELECT * FROM tblContestants WHERE Response= '" & Tiger Woods "'"
At least that's the easy part. What I'd like to do is be able to have the app automatically select a record from the aforementioned extracted recordset AT RANDOM, and return only that. This will be the winning contestant for the week.
I'm hoping that the VBScript RANDOMIZE function is the best way to go about doing this. Do you know if the Randomize function can be applied towards a range of records? Because I won't know at design-time how many entries we'll have at any given time, I'm thinking I should write something like:
For i=0 to i -1
to iterate through the collection of winning records and then select a single.
Hmmm.....