Access MVP (2010-2015)

oOo.oOo.oOo.oOo.oOo.oOo

Adding *continued…* to a Multicolumn Report…

After seeing a post in a Forum asking about how to add the word *continued…* to a Multicolumn Report I thought it would be fun to create a sample database showing off the feature, to download click here (Access 2007 or above needed and an unzipping program.  Images are not included!).  And, of course, like everything else, I could not just stop at just doing a simple Multicolumn Report… so, I added the ability to add pictures at the beginning of each Articles (or not), printing Articles or Publications, like Newsletters!  (To read more about that click here.)
Figure 1

Figure 1

The How…Continued

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

All done, you can run your report!

 1,358 total views,  1 views today

Comments are closed.