Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max record number in a report 1

Status
Not open for further replies.

olekr

Instructor
May 27, 2001
19
NO
Hi!
I want a report with names. One person pr. line. Under the persons name, I want a thin line. I just want max 10 persons in a page, but I want the lines to continue down the page. Then I can fill in, with a pencil, more names after printing. Is this possible?
Regs and thanks Ole
 
Yes its possible. There are many ways. One is to place a variable at the top of you report code. Then add another “Sorting and Grouping” to the report. In the Footer of this new group add your extra lines followed by a “Page Break”. In the “Detail On Print” add an “[Event Procedure]” and copy the below code in that procedure.

‘ Add this to the top of the report code
Dim nCount As Byte

‘ add this to the Detail Print Proecedure
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If nCount < 9 Then
Me.GroupFooter2.Visible = False ‘ make second sort footer with the lines and page break not seen
Else
Me.GroupFooter2.Visible = True ‘ now the count is 10, the page break is seen
nCount = 0
Exit Sub
End If
nCount = nCount + 1
End Sub
 
Hi StarPassing!
Splended!! Thanks a lot.
Regs Ole
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top