By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,034 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,034 IT Pros & Developers. It's quick & easy.

Randomize fields

P: n/a
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
HJ
Do you want to reshuffle the data in the table itself? Or do you want to
present the answers in a random order to the user?

In either case message 8 in this discussion may help:
http://groups.google.nl/groups?hl=nl...cess%26hl%3Dnl

HJ

"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!

Nov 13 '05 #2

P: n/a
Rob,

I suggest you first redesign your table into two tables ----
TblQuestion
QuestionID
QuestionNum
Question
AnswerID 'CorrectAnswer

TblAnswer
AnswerID
QuestionID
Answer

For each question you would have four records in TblAnswer; four different
AnswerIDs, same QuestionID in all four records and four different Answers.
You would then randomly assign the correct Answer to one of the four
AnswerID noting the value of which AnswerID got the correct Answer and
assign that value to AnswerID in TblQuestion. Implementation is far from how
simple it sounds!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!

Nov 13 '05 #3

P: n/a
I'm really wanting to just keep the data in the one table and shuffle the
contents of Choices1-4 field in each record and then keep track of which of
the 4 Choices is the correct answer and keep that number in the
CorrectAnswer field.

I'm pretty good at Pascal and a little C, but I have no clue how to write
this module for Access.

The table I'm wanting to shuffle the fields on is to be used to generate a
multiple-choice exam. I need to generate an anwer key for it as well.

Thanks again for you help on this!
"HJ" <hj********@spamhotmail.com> wrote in message
news:41***********************@news.xs4all.nl...
Do you want to reshuffle the data in the table itself? Or do you want to
present the answers in a random order to the user?

In either case message 8 in this discussion may help:
http://groups.google.nl/groups?hl=nl...cess%26hl%3Dnl
HJ

"Rob South" <ro**********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
Hi All,

I have an Access DB of Questions, Answers, and Distractors. The field
names are as follows: Question, Choice1, Choice2, Choice3, Choice4,
CorrectAnswer

Choice1 at present contains the correct answer. Choices 2-4 are
distractors. CorrectAnswer denotes which of Choice1-4 is the correct
answer.

What I need is a module that will randomize the correct answer among
Choice1-4 and note which is correct in CorrectAnswer.

Can anyone help?

Thanks in advance!


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.