limit number of records

xomich16xo

New member
Local time
Today, 17:16
Joined
Dec 30, 2011
Messages
6
heyy,

Im currently working on a database on which my report is generated of a query which has 8 records. i need to format my report in a way so that only 4 records show or are printed on each page where as right now there are 6 on one page and 2 on the other.

does anyone know how i would be able to get this done??

thanks
 
The quick way would be to increase the Page Footer section so it occupies enough space to force the Detail section to print only 4 records. Ensure the Auto Resize of this section is set to No. But if your Header section is not repeated across all pages then this is not the solution for. You will have to resort to code or a subreport trick.
 
The quick way would be to increase the Page Footer section so it occupies enough space to force the Detail section to print only 4 records. Ensure the Auto Resize of this section is set to No. But if your Header section is not repeated across all pages then this is not the solution for. You will have to resort to code or a subreport trick.

would you able to help me out with a code or macro to do this....as i need to be able to show how ive limited the page to only 4 records...
 
Is this supposed to be for homework? ;)

i wouldnt say homework....i bit more important than that....but i need to figure it out either way.... i just found the following code online...would that work...and if it would work....should i be attaching it to the OnPrint control or another control?

Dim lnCount As Integer

'Initialize variable
Private Sub ActiveReport_ReportStart()
lnCount = 1
End Sub

Private Sub Detail_Format()
'change 16 in the following line to the number of records per page desired

If (lnCount Mod 16) = 0 Then
Detail.NewPage = ddNPAfter
Else
Detail.NewPage = ddNPNone
End If

lnCount = lnCount + 1
End Sub
 

Users who are viewing this thread

Back
Top Bottom