[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

Access multicolumn report: change visibility of control on Repeat Section

Access 2003

I have a multi-column report. I use the Repeat Section property to repeat the title of each column group as it continues to the next column. How do I print the original column heading the first time through and then append "continued" to the column heading only when the section is repeated?

  • 2
  • 2
1 Solution
Jeffrey CoachmanCommented:
Try this:

BradleyOnTheRoadAuthor Commented:
That was good but will it work with inconsistent row numbers?

I think the answer may be in the HasContinued property but I'm still trying to figure out how to make it work. But if it works then it shouldn't matter if the groupings change.
BradleyOnTheRoadAuthor Commented:
I haven't figured out the HasContinued property or how to use it but this works with multicolumn (both at the top and in the middle of a column):

Option Compare Database

Private strPrevHeading As String

Private Sub GroupHeader1_Print(Cancel As Integer, PrintCount As Integer)
    If (strPrevHeading = Me.txtHiddenOfficeGroup) Then
        Me.txtOfficeGroup = Me.txtHiddenOfficeGroup & " (continued)"
        Me.txtOfficeGroup = Me.txtHiddenOfficeGroup
    End If
    strPrevHeading = Me.txtHiddenOfficeGroup
End Sub

A hidden field contains the heading name. And then I append "Continued" to the text box that displays the heading for the report.

I placed the code in the OnPrint event of the GroupHeader (GroupHeader1) where the heading is.
Jeffrey CoachmanCommented:

Your original post made no mention of "inconsistent row numbers".
My post did exactly as you original post specified.

As far as I know it will always work unless you have something set in your report that I don't know about.
Did you try it with "inconsistent row numbers"?



Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now