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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need desperate help with a report 2

Status
Not open for further replies.

ladivapr

Technical User
Sep 9, 2003
1
US
Hello guys, I have a question regarding access reports..

Okay I have various reports witht he following problem. My client wants the reports in way that it shows in the header when its a continuation of the information of the before page. Like if a paper is found you can be able to tell there is more information and whatnot. Okay like this:

Page 1

dog----bone
-------bone
-------bone

Page 2

----bone
----bone
----bone

Now I would like Page 2 to look like this

Page 2

dog (continued)
----bone
----bone
----bone

Is there a way I can do this? Like a macro or something? My client just want it this way. Please help me out!

 
Try this:

Add an invisible text box to your detail section. Set its control source to =1 and the Running Sum property to Over Group. (When this control is equal to 1, we don't want to display "Continued", when it is more than 1 it means the next page for the group and we do want to display it)

Add an unbound text box to the group header that will contain the field(s) and the "Continued" label if it applies.

In the On Format event of the group header, put code like this:

If Me.InvisibleTextBox = 1 Then
Me.HeaderTextBox = Me.GroupFieldName
Else
Me.HeaderTextBox = Me.GroupFieldName & " (Continued)"
End If

This code will assign the field value only when it is the first page for that group, otherwise it will append the "Continued" text to it.

Let me know if this makes sense.....



Hoc nomen meum verum non est.
 
One more thing....

I neglected to mention that you have to set the Repeat Section property of the group header to Yes.

Hoc nomen meum verum non est.
 
Cosmo, I'm having trouble running this. It seems no matter where I put my textbox it increments either with each record (if I put it in the Detail section, even though the Running Sum is set to Over Group and not Over All) or with each group, if I put it in the Header Section. Any thoughts on what I'm doing wrong.

Thanks

Paul
 
Paul,

The invisible incrementing text box should be in the detail section. Because of the Over Group setting, its value in the first detail record of each group will always be 1.

When interrogating that value in the group header you can append the "Continued" text if the RunningSum text box is not = 1.

Let me know if this helps....

Hoc nomen meum verum non est.
 
Worked like a charm once I followed the rest of your instructions. I was thinking that it would pick up the last value in the group (which wouldn't necessarily tell you if it was continued) but with the code in the Header Format event it picks up the first value in the textbox. Very nice. It gets a star from me.

Paul
 
Hi,

I found an easier method:

2 unbound textboxes:

First textbox - at the top of the page:
controlsource =IIf([Pages]>1,IIf([Page]=1,"","...continued from previous page"),"")

Second textbox - at the bottom of the page:
controlsource =IIf([Pages]>1,IIf([Page]=[Pages],"","continued on next page..."),"")

You could add additional fields to the messages.

Further, this works in preview, and print from preview mode.

Garry
 
Cosmo,

I tried your suggestion but found one scenario where it doesn't work. If the group header happens to be far enough at the bottom of the page that it only shows the header and no items, then the header on the next page will not show "continued". I guess it doesn't really matter since there are no records on the previous page though. Just thought you might find it interesting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top