Location of a Top of Section

D

Dwight

I need help figuring out the proper syntext to determine where the top of a
section will print on the first page of my report.

Here is one of the attempts I made with no success.

If Me!GroupFooter0.Top = 8200 Then
DoCmd.RunMacro "YesPageBreak"
Else
DoCmd.RunMacro "NoPageBreak"
End If

Thanks in advance!

Dwight
 
A

Allen Browne

Crucial aspect is that code needs to be run in the Format event of the
section that contains the page break control. It may help to add this line
so you can see what Access thinks the Top property is in the Immediate
Window (Ctrl+G):
Debug.Print Me.Top

Probably easier to just set the Visible property of the control rather than
call a macro.
 
Top