Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeating Group Headers

Status
Not open for further replies.

tskelton

Programmer
Jun 14, 1999
19
0
0
US
Hi, all. I would like to format my report so that if the detail section spills over to the next page, the word "continued" appears in the text box that's in the group header. In other words, on page 1, the group header says something like "California". Then the detail section follows, but it's too big to fit on page 1, so it spills over to page 2. At the top of page 2, I would like the Header to say "California (continued)". I know about the repeat section property, but that only repeats the header; it doesn't add "continued". Any ideas? Thanks for any and all suggestions!

-Todd
 
Great question. I thought there must be a way, and I think I have found it. First thing you must do is to number the detail lines in your group. Look at the help topic "Count the number of records in each group in a report" in MS Access. Don't worry about adding the text box to the footer, just number the detail lines. Give the calculated textbox the name RecordNumber. Then in your group header, add a calculated textbox with ControlSource
=IIf([RecordCount]>1,"Continued","")

Let me know how it goes.
 
Kathryn,

Your suggestion worked like a charm! I never even thought of using a record count. Thanks for your advice! :)

-Todd
 
Glad to hear it worked. Especially since I am getting NOTHING productive done at work, due to a bad hard drive!
 
Kathryn,

This is a great solution, but it only worked when I put the =IIf([RecordCount]>1,"Continued","") field in the Group Footer. Since the Header is formatted before the detail section, the RecordCount field has not yet been calculated. The Footer does know about it, as it is formatted after the Detail section.

Any thoughts?
[sig][/sig]
 
Kathryn's solution worked for me. Do you have the Repeat Section property set to "Yes" for the header? I did.

Here's how I think it works: The header is simply repeating, not being calculated, when you want "Continued" to appear. A portion of the detail section has already been formatted, so the RecordCount field calculates as being >1 because the header is repeating, not being formatted for the first time.

Let me know if this helps at all.

-Todd [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top