×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Changing Page Footer Main report after section in Sub Report

Changing Page Footer Main report after section in Sub Report

Changing Page Footer Main report after section in Sub Report

(OP)
So currently I have a module scoped variable lngLastEnPage. I use this to determine my last English page as I know which section it occurs in per code below.
Then in the page footer I change the text I use. In reality I am using values from other hidden controls but for simplification, "Hello World".


CODE

Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
  'Needs placed on last section for English letter
  If lngLastEnPage < Me.Page Then
    lngLastEnPage = Me.Page
  End If
End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
  Dim lngPage As Long
  lngPage = Me.Page
  
  'Set Control according to value
  If lngPage > lngLastEnPage Then 
      Me!txtFooter = "Hola Mundo"
  Else
     Me!txtFooter = "Hello World"
  End If
End Sub 

Because of code reuse, I want to move everything related to report header and footer to a main report. I am thinking of adding a lastEnPage property to the sub report to return the variable... Anybody know if something like that will work and if not what avenue to try? I just have not done a lot of crazy stuff with reports to have the nuances of the timing down for subreports and pagination. It seems sound in principle. Just realized my real problem is that I am going to have to always have that property or value going down this path even if it is all English.

RE: Changing Page Footer Main report after section in Sub Report

I'm not quite sure what you are attempting to accomplish. However, I don't believe a subreport has any knowledge of Page or Pages or Page sections.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close