Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Question Unanswered: Access Report (Unique Picture on Page Footer)

    I need to have a unique JPEG picture displayed on a page in the report footer section. I have 3 unique pictures and one must be displayed on each page (A.JPEG on page 1, B.JPEG on Page 2, C.JPEG on page 3, A.JPEG on page 4... etc).

    I have the following code in place.

    Private Sub PageFooter_Print(Cancel As Integer, PrintCount As Integer)
    Dim varPgTotal As Integer, i As Integer
    Dim varPicture As Integer
    Dim varPgCount As Integer

    varPicture = 1
    varPgCount = 0
    varPgTotal = 7 'shouldn't be hard code, need to check how many pages in total

    For i = 1 To varPgTotal
    If varPicture = 1 Then
    AdvReFlex.Visible = True
    AdvPrecise.Visible = False
    AdvWinter.Visible = False
    varPicture = 2
    ElseIf varPicture = 2 Then
    AdvPrecise.Visible = False
    AdvReFlex.Visible = True
    AdvWinter.Visible = False
    varPicture = 3
    Else
    AdvPrecise.Visible = False
    AdvReFlex.Visible = False
    AdvWinter.Visible = True
    varPicture = 1
    End If

    Next
    End Sub

    It compiles OK, but the picture displayed is always the same.

    Any suggestions?

    Thanks!

  2. #2
    Join Date
    Sep 2003
    Posts
    228
    Your logic is flawed...

    Your code runs everytime a page footer is printed. Whether it is on page one or page two.

    Try something like this in the format event of the page footer...
    Code:
    Select Case me.page
       Case 1:
          'Do your page one stuff
       Case 2:
          'Do your page two stuff
       Case yada yada yada:
          'Continue until done
       Case Else:
           'format all others
    End Select

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •