Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Access 2010 report header...

Access 2010 report header...

Access 2010 report header...

I have a report in Access 2010.
This report contains 31 pages.
On each page are approximately 32 part numbers with descriptions, sorted ascending, numerically by part number.

What I am trying to do is to put the first and last part number contained on each page of the report in the header or footer section to make searching through the report easier for the user to find their number. The report is constantly changing with the addition and deletion of part numbers so I need this to be dynamic. Just like in a phone book.

For example: Page 1 of 32 0000-0709, Page 2 of 32 0710-0993, Page 3 of 32 0994-1234 and so on.

I do not know what this is called, how to make it possible or what to search for here or in Google for more information.

Any suggestions will be greatly appreciated. Thanks a bunch.

RE: Access 2010 report header...

The agregate functions should work in the control source in headers. So the first and last would be the Min and max so the range in a control source would look something like below...


=Min(PartNo) & "-" & Max(PartNo) 

RE: Access 2010 report header...

Min and Max won't work in Page sections.

I just created a report in the Northwind sample database. The report was on the Orders and Customers tables and grouped by CompanyName.

I added a text box in the Page Header section:

Name: txtFirstCompanyName
Control Source: CompanyName

I added another text box in the Page Footer section:

Name: txtLastCompanyName
Control Source: CompanyName

I then added code to store the first company value and then print both values in the Page Footer.

CODE --> vba

Option Compare Database
Dim strFirstValue As String

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    Me.CurrentX = 2000
    Me.CurrentY = 100
    Me.Print strFirstValue & " - " & Me.txtLastCompanyName
End Sub

Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
    strFirstValue = Me.txtFirstCompanyName
End Sub 

Hook'D on Access
MS Access MVP

RE: Access 2010 report header...

I didn't realize page headers and footers didn't work that way. I guess I've only done it on report and grouping headers/footers and assumed the behavior was the same.

RE: Access 2010 report header...

It's a common error when designing reports (especially one pagers) to place Sum() and other aggregates in the Page Footer section. I was hoping Access 2010 might have greater functionality but when I tested the aggregates they still didn't work.

Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close