ACC: Repeating Group Name at Top of New Column or Page (1.x/2.0)ID: Q93927
|
Moderate: Requires basic macro, coding, and interoperability skills.
This article describes how to create a report that prints "continued" or
"Group Name continued" at the top of each new column or page when grouped
information flows from one column or page to another.
Microsoft Access prints a single group header at the beginning of a group
to identify the beginning of the group. It does not repeat the header at
the top of subsequent columns or pages. However, you can use the procedure
described below to force a report to repeat the group name if the records
in a group span several columns or pages. This article uses the List Of
Products By Category report from the sample database NWIND.MDB.
NOTE: The steps in this article are no longer necessary in Microsoft
Access version 7.0. In Microsoft Access 7.0, you can use the RepeatSection
property to repeat a Group Header at the top of a new column or page. For
more information about the RepeatSection property search on the word
"RepeatSection" using the Microsoft Access for Windows 95 Help Index.
Dim Message As String
Dim VerMes As Long
If MyFlag = True Then
Me.scalemode = 1
Me.FontName = "Courier" ' Use Courier font.
Me.FontSize = 10 ' Use point size of 24 points.
Message = [category name] & " Continued" ' Text to be
' displayed.
VerMes = Me.TextHeight(Message) ' Vertical height.
Me.CurrentX = 800
Me.CurrentY = Me.section(3).height - VerMes
Me.Print Message
MyFlag = False
End If
MyFlag = True
MyFlag = False
.34 + .25 = .59
For more information about printing conditional page headers, please see
the following article in the Microsoft Knowledge Base:
Q105516 ACC: How to Print a Conditional Page Header in a Report
You can also obtain this article through Microsoft FastTips by ordering
item number 105516 from the FastTips Main Menu.
For information about how to create multiple-page reports with snaking
columns, search for "multiple-column reports," and then "Creating Snaking
Columns on a Report" using the Microsoft Access Help menu.
You can find information, instructions, and examples in the Solutions
sample application (SOLUTION.MDB) included with Microsoft Access version
2.0. For more information about printing a conditional page header, open
the SOLUTION.MDB database, usually located in the ACCESS\SAMPAPPS
directory. In the Select A Category Of Examples box, select "Control what
you print on reports," and then in the Select An Example box, select
"Repeat a group name at the top of a column or page."
Additional query words: multicolumn snaking-column
Keywords : kbusage RptSort
Version : 1.0 1.1 2.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 13, 1999