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!

LIMIT NUMBER OF RECORDS IN SUBREPORT

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
US
I tried the method that is in this forum in regards to records, but it also states that it assumes that the page break and count are in the same detail, which I am thinking that they are because it is in a subreport that I want to minimize the records showing. I need a max of three records to appear in the subreport or it pushes my image onto another page. Can someone assist me with this. We are using ACCESS xp in 2000 mode.

Thanks in advance
 
4 and greater I don't want to do anything with. These are locations of parts for picking to ship. This sub report is just to give the person shipping the parts an idea of where they have been put in inventory. They don't need to see anymore than three locations at a time. I have set the sub report to not grow and it will only show three items, but still pushes the image onto the next page as if it has shown all 10 locations.
 
If the subreport isn't pushing the image to the next page then something else that we don't know about is happening.

I'm not sure it will help but you can add a text box in the subreport:
Name: txtCount
Control Source: =1
Running Sum: Over All
Visible: No

Then add code to the On Format event of the subreport detail section:
Code:
Cancel= Me.txtCount> 3
This will also limit the number of records and size of the subreport.

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

Part and Inventory Search

Sponsor

Back
Top