pull one of each group per page?

R

Rick B

Okay, we have a database of trivia questions for an upcoming event at work.
Each question has a "category".

We will not have a computer at the event, so we want to build a report that
will pull on "TV" question, then one "MOVIE" question, then one "MUSIC"
question, etc. We then want to print a line or form feed, then start again.

In short, we want cards or sheets with one of each type of question. No
duplicates.

Even using code, I am lost on how to do this. I'd like to do it without
code (so that the person who built it can make it without my help).

The table is basically:

TblQuestions
AutoNumber
QuestionType (drop-down with 6 options)
Question
Answer

Any help would be greatly appreciated!
 
D

Duane Hookom

I would probably create a sequence/rank field in a query with SQL like:
== qselTypeSequence======
SELECT Autonumber, QuestionType, Question, Answer,
DCount("*","tblQuestions","QuestionType=""" & [QuestionType] & """ AND
AutoNumber <=" & [Autonumber]) As Sequence
FROM tblQuestions;

Then create a report with qselTypeSequence as the recordsource. Sort and
Group first by Sequence with a group header and footer. Then Group/sort by
Question type.

You can force new page after the Sequence Footer Section.
 
R

Rick B

Duane:

You Rock!!!

Thanks!

--
Rick B



Duane Hookom said:
I would probably create a sequence/rank field in a query with SQL like:
== qselTypeSequence======
SELECT Autonumber, QuestionType, Question, Answer,
DCount("*","tblQuestions","QuestionType=""" & [QuestionType] & """ AND
AutoNumber <=" & [Autonumber]) As Sequence
FROM tblQuestions;

Then create a report with qselTypeSequence as the recordsource. Sort and
Group first by Sequence with a group header and footer. Then Group/sort by
Question type.

You can force new page after the Sequence Footer Section.

--
Duane Hookom
MS Access MVP


Rick B said:
Okay, we have a database of trivia questions for an upcoming event at
work. Each question has a "category".

We will not have a computer at the event, so we want to build a report
that will pull on "TV" question, then one "MOVIE" question, then one
"MUSIC" question, etc. We then want to print a line or form feed, then
start again.

In short, we want cards or sheets with one of each type of question. No
duplicates.

Even using code, I am lost on how to do this. I'd like to do it without
code (so that the person who built it can make it without my help).

The table is basically:

TblQuestions
AutoNumber
QuestionType (drop-down with 6 options)
Question
Answer

Any help would be greatly appreciated!
 

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