Reports

  • Thread starter Thread starter nbohana
  • Start date Start date
N

nbohana

I am trying to put a heading on a report when I open it. The following code
will not put the heading on the first page, but puts the heading on all other
pages. Please tell me if possibel how to get the heading on the first page.

Case Is = 7

DoCmd.Close acReport, "stDocName"

strFilter = "[rotarian]"
stDocName = "PhoneReport"
DoCmd.OpenReport stDocName, acPreview, , strFilter
Reports!PhoneReport.[head] = "South Pasadena Rotary Club Rotarian Report"

Thanks for your help.
 
On Fri, 18 Apr 2008 17:01:01 -0700, nbohana

If the title is a constant as it is here, you can put it in at design
time.
Assuming it is dynamic, you can put the text in a hidden field on the
form you launch the report from, and then in the report header control
set the ControlSource to something like:
=Forms!TheReportLaunchForm!TheHiddenField

-Tom.
 
Thanks for replying. I use this report with different data that needs
different headings is there any other way to solve my problem?


Tom van Stiphout said:
On Fri, 18 Apr 2008 17:01:01 -0700, nbohana

If the title is a constant as it is here, you can put it in at design
time.
Assuming it is dynamic, you can put the text in a hidden field on the
form you launch the report from, and then in the report header control
set the ControlSource to something like:
=Forms!TheReportLaunchForm!TheHiddenField

-Tom.

I am trying to put a heading on a report when I open it. The following code
will not put the heading on the first page, but puts the heading on all other
pages. Please tell me if possibel how to get the heading on the first page.

Case Is = 7

DoCmd.Close acReport, "stDocName"

strFilter = "[rotarian]"
stDocName = "PhoneReport"
DoCmd.OpenReport stDocName, acPreview, , strFilter
Reports!PhoneReport.[head] = "South Pasadena Rotary Club Rotarian Report"

Thanks for your help.
 
Back
Top