HELP!!! Need to modify Report heading via VB code

fenerfan

Registered User.
Local time
Today, 07:10
Joined
Dec 3, 2006
Messages
22
Hey All,

I Have a button on my form when pressed it shows a report in print preview mode.

The code looks like this:
DoCmd.OpenReport "(REPORT TITLE)", acViewPreview

Is there any way I can manipulate this code to set the header of the report???:confused:
 
Hi there Fenerfan,

I am not sure about the actual question you ask but I think you cannot manipulate the reprot from the code that calls it.

What you can do however, is manipulate the report itself directly in the "on Print" event.

On my form I have code that populates various text boxes and labels relating to the records currently shown etc.

In my main report I reference these text boxes or the varibale that populates them in the on print event and use them to populate text boxes and labels on the report. Thus my report is now titled as "Projects In-Progress for department x" with a label below detailing the last update date.

If this is what you are trying to do, can post the code when I get into the office in about 3 hours time.

Regards,
 

Users who are viewing this thread

Back
Top Bottom