access quiz system (1 Viewer)

obeylele

Registered User.
Local time
Today, 19:06
Joined
Jul 29, 2005
Messages
28
hi
i am trying to make a quiz system using ms access
i want to select 30 questions randomly from a questionbak of 100 or more
also i need to select 3 answers randomly including the corect answer
from answer bank that has 5 possible answers for each question

tblquestionbank
QID Question
1 Question1
2 Question2
3 Question3

tblanswerbank
AID QID ANSWER CORRECT
1 1 Q1 answer a true
2 1 Q1 answer b false
3 1 Q1 answer c false
4 1 Q1 answer d false
5 1 Q1 answer e false

the field correct is for identifying the correct answer yes/no filed

so far i have been able to get the questions randomly
that is generating a random number in the query and selecting
top 30 records

ideas and help would be appreciated
 

KeithIT

Registered User.
Local time
Today, 11:06
Joined
Dec 20, 2004
Messages
133
First off, have a field in your question bank table that lists the ID of the correct answer in your answer bank table. Then get rid of that true/false field in the answer bank table. Now you ahve a direct link to the correct answer for every question.

You can use the same system you set up for having the questions as with the answers, but you want to pull the correct answer using it's ID from the questions table, then pull however may other random answers, so long as their ID doesn't match the correct one already pulled, or any other one that is pulled.

Then you want to randomly sort the answers that you have based on another random number generated.

How's that for starters? Can anyone think of a simpler way to work through this?
 

johnwatkins35

Registered User.
Local time
Today, 08:06
Joined
May 16, 2012
Messages
20
keithIT do you have an example because i have been racking my brain for weeks now. i find all kinds of templates but none are what im looking for. what im trying to create is mulitple choices but there is about 10 choices, and 3 of them have to pick from a drop down list.
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:06
Joined
Sep 21, 2011
Messages
14,597
keithIT do you have an example because i have been racking my brain for weeks now. i find all kinds of templates but none are what im looking for. what im trying to create is mulitple choices but there is about 10 choices, and 3 of them have to pick from a drop down list.

Almost a 13 year old thread?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:06
Joined
Feb 19, 2002
Messages
43,700
Once you change the table as was suggested so that the answer is linked to the question by the ID, then you would use a union query to select the answers. The first query in the union would select the correct answer and the second query would select 2 answers randomly but have additional criteria to exclude the real answer. You should sort the answers by answerID so that the correct answer isn't always in the first position. Of course if you built the answers with the correct answer always first, you'll have to figure out how to sort the questions randomly.
 

Users who are viewing this thread

Top Bottom