Solved

Conditional Page Break

Posted on 2011-09-06
2
520 Views
Last Modified: 2012-05-12
Hello Experts,

My client has asked me for a really unique request, and I hope you can provide me with an idea or two on how to make this happen...

I have a commissions report with the following layout:

   Location group
      Sales Person (Agent) Group
          Transactions List

After printing, my client actually cuts each agent's section, placing it in an envelope with a cheque.  

This works for them, but the problem is that an agent may just start at the bottom of one page and finish at the top of the next.  As well, I cannot place a page break after each agent, as most have 2 or 3 transactions, which will generate 200 pages with more than 80% of the pages being empty.

A single page sometimes can comfortably fit 4 agents on it, so what i'm looking for is if I can execute the folowing condition:

      If Agent group does not finish on current page, start on next page

One exclusion, however, in the very rare cases, that one agent may have many transactions spanning to more than one full page, i do not want the above logic to cause an endless loop, where it will never fit one the "current" page, moving forward to the next page, which will become the new "current" page.

For the time being, i would like to keep this within Access/VBA, but am also open to exporting it to another Office or 3rd party apllication.

Many thanks in advance.
0
Comment
Question by:APD_Toronto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
Luke Chung earned 500 total points
ID: 36489350
There's a KeepTogether prorperty for groups that will do what you want. Set it to Yes, and it will make sure the whole group stays on one page, and if not, issues a page break before it.

If the group itself is more than one page, it will go beyond that of course but that's expected.

More resources including report tips on our Microsoft Access Developer Help Center.

hope this helps.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36489450
...else post a small sample DB that demonstrate the issue, and post a graphic example of the *exact* output required for each scenario... based on the sample data
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
access vba 5 59
Add Underline to custom Caption on Label 4 37
Moving database to a shared server 7 37
ms/access follow hiperlink and generate image 7 26
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question