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

parallel reports after random selection

P: n/a
I'm using radnom selection in ms access to select certain number of
questions for the exam. i have two versions of the report:
- one without marked answers
- one with marked answers
the problem is when i generate the reports one after another, i don't
get the same selection of questions. Does anyone knows how to generate
two parallel reports that would give the same random selection?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Micak wrote:
I'm using radnom selection in ms access to select certain number of
questions for the exam. i have two versions of the report:
- one without marked answers
- one with marked answers
the problem is when i generate the reports one after another, i don't
get the same selection of questions. Does anyone knows how to generate
two parallel reports that would give the same random selection?


Two ideas. One, create a table. Clear it out prior to running the
first report. Then run a procedure to create a random set of numbers
and insert the key into the table. Then ih your report add the new
table link the key to the field in the new table.

Create a variable. Run the proc and store all the keys into the
variable. Then do something like
Docmd.OpenReport "RptNmNoAnswer",,,"ID in (" & variable & ")"
Docmd.OpenReport "RptNmWithAnswer",,,"ID in (" & variable & ")"
and filter on that string of id's.

One other option. When you do the first Rnd, get the initial seed
value. If you use the same seed value, you should get the same random
sequence on the second set. Check out Rnd for more information.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.