Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make report header visible=false on value of Page? 2

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
This is the report footer:
="Page " & [Page] & " of " & [Pages]

I want to write code to make the header invisible if the page is 1.

I've tried a few versions of something like this:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.ReportFooter.page = "1" Then Me!PageHeaderSection.Visible = False
End Sub

But it's not working. Any ideas?
 
have you tried...

If [page] = "1" Then Me!PageHeaderSection.Visible = False



Program Error
Programmers do it one finger at a time!
 
If [page] = "1" Then Me!PageHeaderSection.Visible = False

are you testing to see if [page] = a character "1" or number 1?

a "1" = decimal 49. a 1 = decimal 1.



try without the quotes.
 
You probably would also want to reset the Visible property for page 2 and beyond....
Code:
If Me.Page = 1 Then 
   Me!PageHeaderSection.Visible = False
Else
   Me!PageHeaderSection.Visible = True
End If

I'm CosmoKramer, and I approve this message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top