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.