Random test generator

  • Thread starter Thread starter Billiam
  • Start date Start date
B

Billiam

Hi,
Can anyone reccomend a sample question and answer database example. My needs
are:
Choose from a sample of 150 questions, multiple choice answer, to produce a
test of 50 questions (no duplicates) AND be able to 'mark" the test somehow?
I was thinking of using the electronic form method to send the test to be
filled in, and then data mined to be scored somehow?
Thanks,
Billiam
 
Hi,
Can anyone reccomend a sample question and answer database example. My needs
are:
Choose from a sample of 150 questions, multiple choice answer, to produce a
test of 50 questions (no duplicates) AND be able to 'mark" the test somehow?
I was thinking of using the electronic form method to send the test to be
filled in, and then data mined to be scored somehow?
Thanks,
Billiam

For part of the problem, You can use the Top Values property of a query, with
help from a little VBA. Put this little function into a Module:

Public Function RndNum(vIgnore As Variant) As Double
Static bRnd As Boolean
If Not bRnd Then
'Initialize the random number generator once only
bRnd = True
Randomize
End If
RndNum = Rnd()
End Function

Then add a calculated field to your Query by typing

Shuffle: RndNum([fieldname])

in a vacant Field cell, where [fieldname] is any field in
your table - this forces Access to give a different random
number for each record.

Sort the query by Shuffle, and set its Top Values property
to the number of records you want to see.

This will give you a random, nonrepeating subset of the questions, in an
editable query.
 
Back
Top