set Force New Page

  • Thread starter Thread starter Microsoft
  • Start date Start date
M

Microsoft

is it possible to set the Force New Page on a Group Footer from code?

I want to be able to give the option of printing each Job on a new sheet or
not.

If yes, how do I do it ?

Thanks
A
 
is it possible to set the Force New Page on a Group Footer from code?

I want to be able to give the option of printing each Job on a new sheet or
not.

If yes, how do I do it ?

Thanks
A

And what is the option method you wish to use? An OptionGroup?
From where? A form?

I would set the Group Header to ForceNewPage BeforeSection rather
thatn the Group Footer to After Section.

Code the Report's Open event:

If CurrentProject.AllForms("FormName").IsLoaded Then
If Forms!FormName!OptionControl = 1 Then
Me.Section(5).ForceNewPage = 1
Else
Me.Section(5).ForceNewPage = 0
End If
End If

Change Section(5) to whatever the actual Group Header number is.
Change "Formname" to whatever the actual name of your form is that
gives the user the option.
Change OptionControl = 1 to whatever control name and value you are
using.
 
Thanks
My report hierarchy is:
Manager Header
Project Header
Detail
Project Footer - Force Page here

If I put the Force page in Project Header I get a blank page with Manager
Header before the Projects start printing.

I'm calling it from a form and wish to use a check box - this part I am ok
with.

Where does the section number come from?
I'm using Access 2007

Thanks for your help so far
A
 
Thanks
My report hierarchy is:
Manager Header
Project Header
Detail
Project Footer - Force Page here

If I put the Force page in Project Header I get a blank page with Manager
Header before the Projects start printing.

I'm calling it from a form and wish to use a check box - this part I am ok
with.

Where does the section number come from?
I'm using Access 2007

Thanks for your help so far
A

Hmmmm. And where does your original message state that you have more
than one Header/Footer?

Look up the ForceNewPage property in VBA help.
Look up the Section property + Section property as it applies to the
Form and Report objects. in VBA help.

I guess I could have written
Me.Section(acGroupLevel1Header)
instead of Me.Section(5) but I'm lazy. ;-)

If you wish to use the Project Footer AfteSection it's OK by me.
Set the section to the correct ProjectFooter section value and use = 2
instead of =1 to choose AfterSection.

Note: I use Access 2002. I'm assuming Access 2007 would be the same
for the ForceNewPage property.
 
Back
Top