two reports off of one querie

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Here's my problem: I a data base of questions and answers
in a table(Question, AnswerA, AnswerB, AnswerC, AnswerD,
Correctansw, primarykey#)I built a querie to select a
fixed number of questions and put them in random order. I
then made a report based on the querie. Now my problem is
I want one report to show question and all possible
answers (this report is the test and is done and works).
The other report I only want question primary key# and
correct answer. This is the report I can't get every time
I run it I think it runs querie again so I can't get an
answer sheet to the first report. (hope this makes sense
to someone and they can help me) I don't know VBA, but if
someone could make it simple enough would try.
Thanks Rick
 
Rick,

I suppose you use a RND() function somewhere to get a random set of
questions? Well, if that's the case, then yes, the second time you run the
query (for the second report) you do get a different set of questions!
My suggestion: use a table to store a random set of questions (just the PK),
and run both reports based on it. I.e.:
Make a delete query that clears this table
Make an append query that re-populates the table with a new random set
Make a select query which combines the original questions table and the one
with the selected random set (this will be the record source for both
reports)
Make a macro or write some code which:
* runs the delete query (clear previous random set)
* runs the append query (make new random set)
* runs the first report
* runs the second report

So when you run the query both reports are based on the same set of
questions.

HTH,
Nikos
 
Back
Top