Results 1 to 4 of 4
  1. #1
    kms is offline Novice
    Windows XP Access 2000
    Join Date
    Aug 2011
    Posts
    2

    Page header does not print on first page of report

    I am not able to get the page header to print on the first page of a multi-page report. It is there in Preview mode but when I Print, it doesn't print out. Here is all the code for the report:

    Option Compare Database
    Dim CurrentStudentNumber
    Dim PreviousFamily As String
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    CurrentStudentNumber = Me.txtNumber
    End Sub

    Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    Dim NumStudents As Integer
    NumStudents = DCount("[FamilyID]", "ClassRoster", "[FamilyID] = '" & Me.FamilyID & "'")


    If NumStudents > CurrentStudentNumber Then
    Cancel = True
    End If
    PreviousFamily = Me.FamilyID
    End Sub

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If PreviousFamily = Me.FamilyID Then
    Cancel = True
    End If
    End Sub

    Private Sub Report_Open(Cancel As Integer)
    CurrentStudentNumber = 0
    PreviousFamily = ""
    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Check the form's PageHeader and PageFooter properties. Do they have 'All Pages'?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kms is offline Novice
    Windows XP Access 2000
    Join Date
    Aug 2011
    Posts
    2
    Yes, they are set to All Pages. If I print the whole report, the page header does print on the first page too, but if I only choose to print page 1, the page header doesn't print.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Sorry, I don't have any other ideas. Sounds very odd.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. =Report won't Print each record on page
    By ashbear in forum Reports
    Replies: 17
    Last Post: 06-13-2013, 04:04 PM
  2. Landscape Page header on a Report
    By Alan1 in forum Reports
    Replies: 2
    Last Post: 07-25-2011, 03:25 AM
  3. Replies: 4
    Last Post: 04-11-2011, 04:25 AM
  4. Report Header on Each Page
    By nweird in forum Reports
    Replies: 1
    Last Post: 07-24-2009, 07:57 AM
  5. code to print just first page of a report
    By tonyrice in forum Reports
    Replies: 1
    Last Post: 02-14-2007, 03:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums