Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    115

    Unanswered: check count of pages

    I currently have this code. However the msg pops up for each page.
    Where do i need to move the code to get the msg only once?


    Private Sub Report_Page()
    Me.DrawStyle = 0
    Me.DrawWidth = 11
    Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B

    'check count of pages
    Dim intTotalPages As Integer
    Dim strMsg As String
    intTotalPages = Me.Pages
    strMsg = "This report has multi pages"
    If intTotalPages > 1 Then
    MsgBox strMsg
    End If
    End Sub


    Thanks

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Currently your message box happens for every PAGE it hits.

    You could put the msgbox at the report footer without any code, the report will count for you. Just msgbox the page# field.

  3. #3
    Join Date
    Jan 2004
    Posts
    115
    I only need a popup when its more than 1.
    how can i do this in teh footer?

  4. #4
    Join Date
    Jan 2004
    Posts
    115
    i added this to the report footer.
    ="Page " & [Page] & " of " & [Pages]

    how do i make the msg to display a popup only if the number of pages is greated than 1 ??
    Thanks

Posting Permissions

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