Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    10

    Unhappy Unanswered: reset number in reports

    how can you reset the count number of records per page??
    my records per page is 25, and how can you reset the number from 1 to 25 on the next page????

    PLEASE HELP!!!

    digtaz®

  2. #2
    Join Date
    Oct 2002
    Location
    Sao Paulo - Brazil
    Posts
    16
    hi, Digitaz

    If i understod your question, you may use this code on module report. In this exemple, the first page is normal, the second have only 10 records an the next pages are normal:

    Option Compare Database
    Option Explicit
    Dim Cont As Integer
    Dim MaxRecPage as integer
    Dim PageToReset as integer

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    if page = PageToReset then
    Cont = Cont + 1
    If Cont > MaxRecPage Then
    Me.Detail.ForceNewPage = 2
    Cont = 0
    Else
    Me.Detail.ForceNewPage = 0
    End If
    else
    Cont = 0
    Me.Detalhe.ForceNewPage = 0
    end if
    End Sub

    Private Sub Report_Open(Cancel As Integer)
    PageToReset = 2 'Number of page for reset
    MaxRecPage = 10 'Number of records in reset page
    Cont = 0
    End Sub
    Regards,

    Rogerio

  3. #3
    Join Date
    Oct 2002
    Posts
    10
    Thanks...i'll try it out. =)
    digtaz

    Originally posted by Rogerolim
    hi, Digitaz

    If i understod your question, you may use this code on module report. In this exemple, the first page is normal, the second have only 10 records an the next pages are normal:

    Option Compare Database
    Option Explicit
    Dim Cont As Integer
    Dim MaxRecPage as integer
    Dim PageToReset as integer

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    if page = PageToReset then
    Cont = Cont + 1
    If Cont > MaxRecPage Then
    Me.Detail.ForceNewPage = 2
    Cont = 0
    Else
    Me.Detail.ForceNewPage = 0
    End If
    else
    Cont = 0
    Me.Detalhe.ForceNewPage = 0
    end if
    End Sub

    Private Sub Report_Open(Cancel As Integer)
    PageToReset = 2 'Number of page for reset
    MaxRecPage = 10 'Number of records in reset page
    Cont = 0
    End Sub

Posting Permissions

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