start each group printing at odd numbered page

R

Remi Noel

Hi :)

A2K

I have a report sorted and grouped by A-Z.

Every new group (1 to x pages) starts at a new page.
A pages 1...x
B pages 1...x
So far everything is fine.
But how can i do every group starts printing at odd numbered pages?

Thanks for any hints to solve this


Remi
 
R

Remi Noel

Hi Marsh

Thanks for helping.

I already tried this but then i get a pagebreak every odd page??

Remi
 
R

Remi Noel

Hello Marsh

Thanks again.

in de meantime i´ve got an answer from the german NG
Homepage: www.Team-Moeller.de
and another helpung hand from Oliver:

Private sCurrentGroupValue As String

Private Sub Gruppenkopf0_Format(Cancel As Integer, FormatCount As
Integer)

Me!pbrSeitenwechsel.Visible = False

If sCurrentGroupValue <> Left$(Me!txtTest, 1) Then
Me.pbrSeitenwechsel.Visible = (Me.Page Mod 2) = 0
sCurrentGroupValue = Left$(Me!txtTest, 1)
End If

End Sub

This works fine.

Thanks again and a nice weekend

Remi
 
R

Remi Noel

Hi Marsh


I dont know that much about programming.
For the moment it works but i will "play" a bit around regarding your
advise.

Many thanks again and have a beautiful sunday

Remi

Marshall Barton said:
That technique does not work in all situations because there
is no guarantee that the report sections (and their event
procedures) will be processed in any particular order.
(Think about CanGrow/CanShrink and the various types of
KeepTogether settings causing multiple nested Retreats).

Getting the page break on all even pages implies that you
have the header section's RepeatSection property set to Yes.
In this case you need a mechanism the determine when the
header is being processed for the first time in each group.
A reliable way to do that is to add a hidden(?) text box
(named txtDetailNum) to the detail section. Use the
expression =1 and set its RunningSum property to Over Group.

Then the line of code would be:

Me.pbrSeitenwechsel.Visible = (Me.Page Mod 2) = 0 _
And txtDetailNum = 1
--
Marsh
MVP [MS Access]


Remi said:
in de meantime i´ve got an answer from the german NG
Homepage: www.Team-Moeller.de
and another helpung hand from Oliver:

Private sCurrentGroupValue As String

Private Sub Gruppenkopf0_Format(Cancel As Integer, FormatCount As
Integer)

Me!pbrSeitenwechsel.Visible = False

If sCurrentGroupValue <> Left$(Me!txtTest, 1) Then
Me.pbrSeitenwechsel.Visible = (Me.Page Mod 2) = 0
sCurrentGroupValue = Left$(Me!txtTest, 1)
End If

End Sub

This works fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top