Limiting report rows

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Hello,

I am generating a report and I would like to limit the
exact amout of rows that the report shows. I can't use a
Top X query because the report contains multiple groups.
Each group can have any number of records under it. If I
do a top x query I actaully get more rows than I want
because the group header and the first row under that
group actually use the same row of data. Is there a way
to just say print X number of records?

Thanks,
Chuck
 
You can add a text box to the detail section
Name: txtCount
Control Source: =1
Running Sum: Over All (or Over Group)
Then add code to the On Format event of the detail section:
Cancel = Me.txtCount > X
Replace X with your number.
 
Back
Top