The How…
In this example I am using a 3 column report. Fields needed are…
tblArticles
aTitle
Controls needed on the report are…
txtTitle– Unbound and in the aTitle Header section
txtTitleHidden – Bound to the field in the table that holds the Title, placed in the aTitle Header section.
Place both controls, txtTitle and txtTitleHidden in the aTitle Header section. Set the aTitle Header section to Can Grow and Can Shrink properties to Yes and set the Repeat Section property to Yes. Then in aTitle Header On_Format event place…
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
Static strLastValue As String 'Posted by Pat Hartman (Access MVP) http://www.access-programmers.co.uk/forums/showthread.php?t=57847 on 11.19.2003 'Modified by Gina Whipp 11.13.2013 to change color, size and position when Article is continued If Me.txtTitleHidden = strLastValue Then Me.txtTitle.Visible = True Me.txtTitle.Properties("TopMargin") = 0.05 * 1440 Me.txtTitle = Me.txtTitleHidden & " ...continued" Me.txtTitle.ForeColor = RGB(140, 140, 140) 'Grey Me.txtTitle.FontSize = 10 'Author is optional 'Me.txtAuthor.Visible = False Else Me.txtTitle.Visible = True strLastValue = Me.txtTitleHidden Me.txtTitle = Me.txtTitleHidden Me.txtTitle.ForeColor = RGB(0, 0, 0) 'Black Me.txtTitle.FontSize = 11 'Author is optional 'Me.txtAuthor.Visible = True End If
End Sub
1,366 total views, 1 views today