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

Limiting Number of Lines on report? 3

Status
Not open for further replies.

emumaster

Programmer
Aug 30, 2001
31
US
I designed a screen report to show a customers name and address on 1 line.
Can I limit the number of detail lines on a page to say 15?
I would then like to push a button on the screen report to get the next 15 and so on. Also my report shows up on the screen so that I have to drag the corner each time to resize it. Is there a way around this??
 
Does the top 15 mean only the first 15 records?
What about the next 15??
 
From Access Help:

1 Open the report in Design view.

2 In the toolbox, click Page Break , then click in the report section where you want a conditional page break.

3 Open the report's PageHeader_Format event procedure.

4 In the event procedure, add an assignment statement that sets the Visible property of the page break control to No. For example, if the name of the control is CondPgBreak, add the following assignment statement:

Me![CondPgBreak].Visible = False

This hides the page break control when the report starts formatting each page, so the page doesn't break.

5 In the Format event procedure of the section where you placed the page break, add Visual Basic code that sets the Visible property to Yes when a condition is met. For example, suppose you want a page break to occur in the detail section of the report if the value of the Counter control is 10, so that the first 10 records will print on the first page. Add the following code to the Detail_Format event procedure:

If Me![Counter] = 10 Then
Me![CondPgBreak].Visible = True
End If

When the condition is met, the page breaks. After the page is broken, the event procedure attached to the page header hides the page break control until the condition is met again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top