Andy Lacey
andy at minstersystems.co.uk
Thu Jun 3 06:08:52 CDT 2004
Neat, Stuart. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: Access Developers discussion and problem solving <accessd at databaseadvisors.com> To: Access Developers discussion and problem solving <accessd at databaseadvisors.com> Subject: Re: [AccessD] Conditional Page Break from Subreport revisited Date: 03/06/04 11:05 > > On 3 Jun 2004 at 9:47, Andy Lacey wrote: > > > Robin > > Just coming at this from a different angle, do the order items have an item > > number (1,2...) within each order? Or could you construct one? If so you > > could solve the issue by having a calculated value in the query, such as > > Fix(([ItemNo]-1)/3). Then you can break on change of that and set the header > > section associated with that break to have a Page Break. > > > > If you have something like ItemNo which is NOT sequential, you can use a static > function to build a breakpoint based on ItemNo or any other field in the query. > > Static Function PageNumber(ItemNo as long) as long > dim counter as long > If ItemNo = -1 then counter =0 > PageNumber = Fix(counter / 3) > counter = counter + 1 > End Function > > Immediately before you open the report (in the button click to show the > report?), initialize sequence with > > ReturnVal = PageNumber(-1) > > Then group your report on =PageNumber(ItemNo) with a page break in the footer. > > > -- > Lexacorp Ltd > http://www.lexacorp.com.pg > Information Technology Consultancy, Software Development,System Support. > > > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2