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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show line number on a report, then restrict pages to 30 lines per page

Status
Not open for further replies.

maudedo

MIS
Jul 10, 2003
41
GB
Hi
On a report I would like to give a value of 1-30 on the first page, 31-61 on 2nd page etc. In otherwords each page break should be where it has reached 30, and then the next 30 be shown on the 2nd page. If I have 300 records in total then this should equal 10 pages with 30 on each, and the autonumber be sequential from the last number on the former page (ie not start back to 1-30 on page 2 and 3 and 4).

I am new to Access 2007 so am having difficulty locating any formatting or vba which would force this.

any idea how I can achieve this, sorry if this isnt clear.
page 1 should show items 1-30
page 2 should show items 31-61
page 3 should show items 62-92
page 4 should show items 93-123

the 1-30 is not based on any value of the database but the fact there are that many records in the data set.

regards
Donna
 
Numbering records is fairly simple. Add a text box with a control source of
=1
Set the Running Sum to Over All.
I would add a page break control at the bottom or the section then use code in the On Format event of the section to display or hide the page break.
Code:
   Me.PageBrkControl.Visible = Me.txtRunSumControl mod 30 = 0

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top