Reports

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.
 
T

Tom van Stiphout

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.
 
N

nbohana

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top