Report – Random Exam Paper # Need to Separate Questions From The Answers??

CarolW

Registered User.
Local time
Yesterday, 18:49
Joined
Mar 24, 2006
Messages
58
Hello Everybody,
I have a burning question; one that I hope might be answered, concerning a DB that I have. Dare I say it; my project ‘successfully’ generates ‘random’ examination questions for me. If I speak to loud it'll certainly crash ...ha! ha!

The control source of my report is based upon a union query which successful pulls random questions from a very sizeable table. This table also holds the matching answers.

The problem that I have encountered is that because each exam paper is unique by virtue of it being randomly generated, the paper needs to have its accompanying answers. They however, must be completely separate of the actual paper that I generate. I have to e-mail out these exams to various places, as either a .doc or .snp file, in order that candidates can take the test. The actual marking/scoring is done by us. In the past we used a different system wherein there was never a problem, as we frequently used static exam papers like PAPER A , B etc which had static answer sheets.

I have pondered over how to get around this problem for many weeks now, but I am still none the wiser. Is there anyway that when I press the command button to generate this report that it will generate
a. The actual question paper.
b. A separate report which contains the relevant answers?

I hope that this makes sense and that some kind person might be able to help me out of this ‘bottomless pit’ that I currently find myself in!! I must have lost most of my hair with sheer frustration!! Ha! Ha!

Maybe there is a different route that I should be pursuing, but I’m kind of lost and would appreciate some expert help. You have all been so very helpful to me in the past, particularly when I have posed ‘basic’ questions. Your advice, as always, has been extremely educational and very helpful to me. Many thanks…………………



Your help and guidance would be gratefully appreciated.

Many thanks....hope this post finds you all in the very best of health and happiness.

Best regards

CarolW
 
OK... This isn't easy per se, but it will do it. Using your random number generator, you need to build a table containing each random number, the associated question, and the associated answer. You then have two reports:

1) Report with the questions only on it.
2) Report with both the questions and answers.

These are essentially the same report. I'm not sure how comfortable you are with report programming, but you can actually use the same report here. You simply set the answer's Visible property to No when generating the first report, and Yes for the second report.

It sounds like you're pretty familiar with how to handle reports, so hopefully I'm just giving you ideas. The trick is making a temporary table that drives the reports, and that temporary table needs to have both the questions and answers on it. (I'm guessing you are using something like a questionID field and an AnswerID field.)

Think about what I'm describing and let me know if you want further help. If you do, I will probably need to see a scaled back version of the DB.
 
Report - Random Exam Paper

Moniker said:
OK... This isn't easy per se, but it will do it. Using your random number generator, you need to build a table containing each random number, the associated question, and the associated answer. You then have two reports:

1) Report with the questions only on it.
2) Report with both the questions and answers.

These are essentially the same report. I'm not sure how comfortable you are with report programming, but you can actually use the same report here. You simply set the answer's Visible property to No when generating the first report, and Yes for the second report.

It sounds like you're pretty familiar with how to handle reports, so hopefully I'm just giving you ideas. The trick is making a temporary table that drives the reports, and that temporary table needs to have both the questions and answers on it. (I'm guessing you are using something like a questionID field and an AnswerID field.)

Think about what I'm describing and let me know if you want further help. If you do, I will probably need to see a scaled back version of the DB.

Many thanks Moniker,
What you said makes sense. What I'll probably do is create a cmd button that will trigger my original union query to make a table as you suggested.
I'll then follow your instructions about creating the two reports but what i'd also like to do is to delete this 'temporary' table I've created on exiting the
database, thereby getting rid of any stale information. I'm not sure what code I would need to:
A. Generate a message to decide whether to delete this table or not.
B. To delete if 'yes' was decided.

Do you think what i've said is OK.

Once again many thanks for taking the time out to reply.

Regards

CarolW
 
In the close event of your main form, put in a Message Box that prompts the user to delete the temporary table. If they select Yes, then it's simple SQL:

CurrentDb.Execute "DELETE * FROM Your_Temp_Table_Name;"

If you'd prefer to wait until they are trying to close Access, then use the Quit method (which triggers a Quit event), accessed like this:

Private Sub AppExit_Click()

-Put your code to prompt them here-

End Sub

(Look up the Quit Method in Access for more info.)

Honestly, though, in order for what I said to work, you'd need to either be deleting the temporary table between each report, or you'd need to store the information separately, perhaps with a "test ID" of some sort in a permanent table. That way, if you lost an answer key, you could always get back to it again.

What you are designing is fairly complex, but so long as it's normalized, you shouldn't have to store mountains of data. Even if you were storing 10,000 "tests" and their corresponding Q&A information, I can't see that being over 1-2MB tops.
 
Random Exam Answer Paper - Problem resolved..

Moniker said:
In the close event of your main form, put in a Message Box that prompts the user to delete the temporary table. If they select Yes, then it's simple SQL:

CurrentDb.Execute "DELETE * FROM Your_Temp_Table_Name;"

If you'd prefer to wait until they are trying to close Access, then use the Quit method (which triggers a Quit event), accessed like this:

Private Sub AppExit_Click()

-Put your code to prompt them here-

End Sub

(Look up the Quit Method in Access for more info.)

Honestly, though, in order for what I said to work, you'd need to either be deleting the temporary table between each report, or you'd need to store the information separately, perhaps with a "test ID" of some sort in a permanent table. That way, if you lost an answer key, you could always get back to it again.

What you are designing is fairly complex, but so long as it's normalized, you shouldn't have to store mountains of data. Even if you were storing 10,000 "tests" and their corresponding Q&A information, I can't see that being over 1-2MB tops.

Thanks Moniker,
Your help is gratefully appreciated. I have managed to achieve exactly what I set out to do.....

I learn more and more on each occasion that I visit this excellent forum..

Your timely support is most welcome and extremely educational.


Regards

CarolW
 

Users who are viewing this thread

Back
Top Bottom