dbTalk Databases Forums  

Randomize fields

comp.databases.ms-access comp.databases.ms-access


Discuss Randomize fields in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rob South
 
Posts: n/a

Default Randomize fields - 11-30-2004 , 09:45 AM






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!

Reply With Quote
  #2  
Old   
HJ
 
Posts: n/a

Default Re: Randomize fields - 11-30-2004 , 12:35 PM






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...ss %26hl%3Dnl

HJ

"Rob South" <robertasouth (AT) hotmail (DOT) com> wrote

Quote:
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!



Reply With Quote
  #3  
Old   
PC Datasheet
 
Posts: n/a

Default Re: Randomize fields - 11-30-2004 , 02:28 PM



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
resource (AT) pcdatasheet (DOT) com
www.pcdatasheet.com




"Rob South" <robertasouth (AT) hotmail (DOT) com> wrote

Quote:
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!



Reply With Quote
  #4  
Old   
Rob South
 
Posts: n/a

Default Re: Randomize fields - 12-01-2004 , 11:10 AM



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" <hjiscoolno (AT) spamhotmail (DOT) com> wrote

Quote:
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...ss %26hl%3Dnl

HJ

"Rob South" <robertasouth (AT) hotmail (DOT) com> wrote in message
news:8b5758e5.0411300745.562c6abd (AT) posting (DOT) google.com...
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!





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.