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

Change title on a report before loading.

Status
Not open for further replies.

djmc

Programmer
Jun 12, 2002
179
0
0
CA
I have VBA code to print a report based on a given SQL statement. I would like to know how I can change the title on the report before it prints. I have a variable called lblTitle which is at the top of the report. I would like to do something like lblTitle.Caption = "something". I am doing this because the report layout is kind of like a template layout with a blank title header. TIA.
 
djmc,

How to do it. Look up in the help on the order of events for the report. on the report load write in something like the following

reports!MyReport.lblTitle.caption = "My New Title"

this will select the label on the form and force it to a new caption

Hope it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top