Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

repeat controls on new page

Status
Not open for further replies.

topwaya

Technical User
May 4, 2005
150
US
I have a report based on a query:

Code:
SELECT TOP 5 qfltWALKParticipants.FullName AS FullName, qfltWALKParticipants.WalkLoc, qfltWALKParticipants.LocW, qfltWALKParticipants.Dept, qfltWALKParticipants.LocFC1, qfltWALKParticipants.LocFC2, qfltWALKParticipants.PhoneW, qfltWALKParticipants.PhoneH, qfltWALKParticipants.Shirt, qfltWALKParticipants.PID
FROM qfltWALKParticipants
ORDER BY Rnd([PID]);

Each time I run the report I get 5 different winners. So I want to display the name and location of the winners on a separate page of the same report (to post on a bulletin board).

So, my first page is all set - I display all of the selected items in the query for the staff.

Then I would like a second page to display:
1.TOP 5 qfltWALKParticipants.FullName AS FullName
2. qfltWALKParticipants.LocW

to post on a bulletin board.

I've tried to do this with page breaks, with subreports, to no avail. I'm a newbie - is there an easy way? Or if not, is there ANY way to do this?

Thanks so much for any help or direction.
 
Yes, I've put the same FullName and LocW controls that are in the detail section, in the Report Footer.

When I run the report the Report Footer displays the FullName and LocW of only the last person listed in the detail section.

I don't know how to get it to display all 5 people that are in the Detail section.

Thanks for the help!!
 
Hi
I just tried putting a subform in the report footer with data from a query showing top 5 records. I made sure that the subform was not linked. All five records showed up. Is this the way you tried?
 
What do I use as the source for my form?

If I use the original winners query (posted first in this thread) as the source for my form I get a different set of 5 winners in the subform.

If I use the qfltWALKParticipants query, it lists all the participants.

Am I missing something? How do I get it to match the same 5 winners selected in the Detail section?

Thanks so much - it was the first time I tried a "form" instead of a "report" as a subreport.

Brandy
 
How did you get the five winners selected in the detail section? I have obviously misunderstood your problem.
I meant to say subreport, not subform. [rednose]
 
The query that posted first:
Code:
SELECT TOP 5 qfltWALKParticipants.FullName AS FullName, qfltWALKParticipants.WalkLoc, qfltWALKParticipants.LocW, qfltWALKParticipants.Dept, qfltWALKParticipants.LocFC1, qfltWALKParticipants.LocFC2, qfltWALKParticipants.PhoneW, qfltWALKParticipants.PhoneH, qfltWALKParticipants.Shirt, qfltWALKParticipants.PID
FROM qfltWALKParticipants
ORDER BY Rnd([PID]);

selects 5 random winners from another query (qfltWALKParticipants).
 
Hi
I think I understand now - the query selects 5 random winners (my reading problem!) I think you will need to create a table based on the query and then run the report.
 
Thank you so much, I will try to do that.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top