Single Query, 2 Reports

G

Guest

Hi

I have a table of questions categorized by 7 subjects. (Math, Physics, English, etc.) More or less I have 1000 questions for each subjects. At one time an exam (for a specific subject) will be generated where 40 questions are selected randomly. Is it possible to generate 2 reports from a single query? I need two reports, one for the examinee and one for the examiner where the answers are also written. I am new at access and I only use macros since I don’t know VB

Thanks in advance
 
D

Duncan Bachen

Hi.

I have a table of questions categorized by 7 subjects. (Math, Physics, English, etc.) More or less I have 1000 questions for each subjects. At one time an exam (for a specific subject) will be generated where 40 questions are selected randomly. Is it possible to generate 2 reports from a single query? I need two reports, one for the examinee and one for the examiner where the answers are also written. I am new at access and I only use macros since I don’t know VB.

Thanks in advance.

Sure!

Make sure to include all the fields in your query that would be used
in either query. This means that you're probably designing a query
which includes two tables, 1-Questions 2-Answers.

Then, you design two reports, but you only include the answer fields
on the second report.

I'm going ask why you want to limit yourself to only one query though?

You'd probably be better off creating two queries... qryQuestions, and
qryQuestionsWithAnswers and create the reports accordingly.


-D
 
C

Chris

I disagree. I would only create one query, and use it as
a source for both reports. The difference would be to not
show the answers on the main report.

Creating two just adds and extra query that you don't
need. Also, if you want to to change something, you would
have to change two queries instead of 1.


Chris


-----Original Message-----
(Math, Physics, English, etc.) More or less I have 1000
questions for each subjects. At one time an exam (for a
specific subject) will be generated where 40 questions are
selected randomly. Is it possible to generate 2 reports
from a single query? I need two reports, one for the
examinee and one for the examiner where the answers are
also written. I am new at access and I only use macros
since I don't know VB.
 
D

Duncan Bachen

I disagree. I would only create one query, and use it as
a source for both reports. The difference would be to not
show the answers on the main report.

Creating two just adds and extra query that you don't
need. Also, if you want to to change something, you would
have to change two queries instead of 1.


Chris

But why bring back unnecessary data in a query if you aren't going to
use it?

On a small scale with few records you might not notice a performance.
On a larger scale, or a situation involving a WAN or other factors,
bringing down only the fields you need is more important.

Suppose one of the fields you don't need is a calculated field? Why
waste the time caculating that for a report who doesn't need it,
especially if it's a complicated expression.

Can you do it in one query, sure. I'm just trying to look to a larger
picture -- one that this individual might never experience.

Just a difference in design techniques I guess.

-D
 
C

Chris

I see your point. My point is, however, there is no need,
for this particular example, to create 2 queries. Chances
are the structure will end up changing, as do most new
databases designed by new developers. Why worry about an
extra query.

Also, if I was going to put this on a WAN, I wouldn't use
Access anyway. It would go in SQL Server or Oracle, where
queries would then be built keeping optimization in mind.

Lastly, the extra field is not calculated, but rather, a
text field.

I understand the need to plan ahead, and develop
accordingly, but I also understand the concept of KISS.
I've looked through too many database apps written by
people who had over 100 queries trying to figure out what
was going on to make things extraordinarily complex.


Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top