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?

Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

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"?


Jeffrey CoachmanMIS LiasonCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.