Posted 4 August 2017, 3:05 pm EST
I have a problem when printing. For example ,I want to print 7 rows in each page and after printed the 7rows the printer could change another page of paper ! How can I do ?</FONT></U>
Posted by: mill009 on 4 August 2017, 3:05 pm EST
Replied 4 August 2017, 3:05 pm ESTIf your bound controls are in the Detail section, you may be able to count the times that the Detail_Format event fires and enable a PageBreak control conditionally based on the value. For example ...
Replied 4 August 2017, 3:05 pm EST
Why would you use a pagebreak control when you could use the NewPage property of the section?
<FONT face="Courier New">Private Sub Detail_Format()
rowCount = rowCount + 1
If rowCount = 7 Then
Me.Detail.NewPage = ddNPAfter
rowCount = 0
Me.Detail.NewPage = ddNPNone
Replied 4 August 2017, 3:05 pm ESTYou are correct, either will work. NewPage will also allow extra options through the NewPageConstants. However, either choice should work fine.