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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Headers and Footers

Status
Not open for further replies.

WayneRyan

Programmer
May 23, 2002
202
US
This is a real work effort, NOT a homework assignment!
This sample is just the simplest way of defining the
problem.

Given a simple report containing people's names and their
test score (0-100). Is it possible to have the page header
show the highest score on the page and the page footer
show the lowest score on the page.

I have tried (I think) all of the various report events,
but I can't produce the desired result.

The process I have followed so far:

One must center on the detail section. If I use the
"OnFormat" event the drawback is that the report
software traverses more records than will appear
on the page (giving incorrect results). If I use
the "OnPrint" event, then the results are correct
but the PageHeader is unavailable (already printed).

Thanks.
 
Hi, I frequently use 'D' statements for these types of problems. Assuming your table is named [Table1], the field in your table for grades is called [grade] and your text box that holds your grades is called [txtGrades], you could place:

=DMax("[grade]","table1","([txtgrade] = '" & [grade] & "')")

in the report header and

=DMin("[grade]","table1","([txtgrade] = '" & [grade] & "')")

in the report footer.

This looks up values in [table1] based on the range of values contained in [txtgrade]

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top