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!

changing the title of the report header on a per page basis

Status
Not open for further replies.

MarcoPerez21

Programmer
May 5, 2004
55
US
I'm new to prgramming in access, MIgrating from Cobol/ Unix enviroment.

Here's my task....
I have this report title on page 1 of the report:
"uncle tom's flash sales"
I need the report header/ Title to for page 2 to be:
"Uncle Tom's Revenue Breakdown"
and so forth for the other pages on this given report


thanks in advance for your patience and help
Marco Perez
 
Here is an example of using the Page() function to update the .Caption property of a label in the Page Header:

Code:
Select Case Page()
    Case 1
       Me!Label6.Caption = "xxxxx"
    Case 2
       Me!Label6.Caption = "yyyyy"
    Case 3
       Me!Label6.Caption = "zzzzz"
    Case 4
       Me!Label6.Caption = "[URL unfurl="true"]wwwww"[/URL]
End Select

Put this code in the OnFormat event procedure of a Page Header. You mentioned that you wanted to use the Report Header for this but the Report Header only shows up once on the first page of the report. You need to use the Page Header. Just shrink down the Report Header to zero height with no controls. Put all of your report/Page Header controls in the Page Header section.

Post back if you have any questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]
 
okay i think that i have it right tell me if this is right:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
Select Case Page()
Case 1
Me!Label831.Caption = "Aunt Sally's Praline Shops Flash Sales"
Case 2
Me!Label831.Caption = "Aunt Sally's Praline Shops Revenue Breakdown"
Case 3
Me!Label831.Caption = "Aunt Sally's Praline Shops Labor/ Productivity"
End Select
End Sub

, here's another question though.
I have a total compared to last years total I want to show the negatives in brackets how do i set that in that text box?


thanks
 
You code looks like it will take care of your Page Header title.

Good luck.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top