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

Change Text Box in Page Header based on the group displayed

Status
Not open for further replies.

PNC

MIS
Jun 7, 2001
87
US
Hi,

I have a report with 3 groups (1, 2 &3). I would like to change the text of the page header based on the group displayed, i.e if group #2 is being shown then the text of the page header should say "Page Header for group #2".

Thx,
PNC.
 
PNC
In your Group Footer section, put a control that indicates the group. For example, let's assume that the Detail section of the report has a field called [Status] and the status can be either "Open" or "Closed." Then, in the Group Footer section, you would put a text box control which has =[Status] as its control source. (Hide it if you don't want it to show)

Set the Group Footer section to go to a new page after the section.

In your report's Page Header, put a text box control which has ="Page Header for Group " & [Status] as its control source.

Tom
 
Thanks THWatson, but here's the solution I used:

Main Report:
3 group headers (=1, =2 , =3)
Put SubReport1 in group header 1, Sub2 in group2 and Sub3 in group3
Detail section is empty.
Page Header is also empty.

Sub-Report:
Make one group header =1 with repeat section = yes.
Put the page header in the group header.

Therefore it looks like for each sub-report I have a different page header.
 
PNC
Sure. In Access, there's always more than one way to get things done.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top