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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
Jeffrey CoachmanMIS 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"?



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.