A.D.TEJPAL
adtp at hotmail.com
Wed Sep 20 13:26:46 CDT 2006
John, You are apparently aiming at the following objectives (for a report having page header as well as group header sections): (a) If page header as well as group header sections both have significant content, only the group header should get displayed. (b) Otherwise, either the page header or the group header (only one out of the two) should get displayed, depending upon which section has significant content. Sample code in report's open event, as given at A) below, should get you the desired results. If you simply wish to suppress the page header on first page, use of Cancel statement in format event of page header section, as given at B) below, should be adequate. Best wishes, A.D.Tejpal --------------- A) - Conditional hiding of Page Header section (If Group Header section is available) ================================ Private Sub Report_Open(Cancel As Integer) If Me.PageHeaderSection.Height > 100 _ And Me.GroupHeader0.Height > 100 Then Me.PageHeaderSection.Visible = False Me.GroupHeader0.Visible = True Else If Me.PageHeaderSection.Height > 100 Then Me.PageHeaderSection.Visible = True Me.GroupHeader0.Visible = False Else Me.PageHeaderSection.Visible = False Me.GroupHeader0.Visible = True End If End If End Sub ================================ B) - Hiding Page Header on first page only ================================ Private Sub PageHeaderSection_Format( _ Cancel As Integer, FormatCount As Integer) If Page = 1 Then Cancel = True End If End Sub ================================ ----- Original Message ----- From: John Skolits To: 'Access Developers discussion and problem solving' Sent: Wednesday, September 20, 2006 21:16 Subject: Re: [AccessD] Quck Question - Report Pageheader Syntax - Expand Actually I have a report header but more importantly, I have a group header. In reality, my ultimate goal is that if there is a group header, I do not want to see the page header, If there is a page header, then the group header shouldn't be displayed. One or the other but not both. At the very least, if I can suppress the page header on the first page, that will do for now.