How to stop a section from printing

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I thought that by setting Cancel = True in the Onprint
event of a section would stop it from being printed.

The controls are not printed but a blank line is printed.
 
Tom,

In a nutshell, the Format event of the section has been done by the time
the Print event comes around, which includes setting up the height for
printing of the section, so if you cancel the Print event, the section
doesn't print but the same amount of space os reserved for the section
in the printed report anyway. In other words, cancel the Format event
instead, or alternatively set the section's Visible property to False in
the Format event, will probably achieve the desired results.
 
Back
Top