Access multicolumn report: change visibility of control on Repeat Section

Posted on 2008-11-06
Last Modified: 2013-11-28
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?

Question by:BradleyOnTheRoad
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    Try this:


    Author Comment

    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.

    Author Comment

    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.
    LVL 74

    Accepted Solution


    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now