Report_Activate() event function not called when in sub form.

  • Thread starter Thread starter Hans
  • Start date Start date
H

Hans

Hi

Using access 2003.

I wrote a Report_Activate() event function to set some specific values for a
chart in a report.

When I open this report is works fine.

When I include this report into an other report (as a sub-report) this event
function is never called.

I see when I add some msgbox statements that the Report_Open() function of
this sub form is called, but not Report_Activate() function.

I need the Report_Activate() event because in Report_Open() I can't use this:

Dim objChart As Object
Set objChart = Me!MyChart.Object

I can use this in Report_Activate().

Anybody an solution for this?
 
The Activate event of a sub report will not fire. You will have to do it in
the main report Activate event.
 
Hi

Using access 2003.

I wrote a Report_Activate() event function to set some specific values for a
chart in a report.

When I open this report is works fine.

When I include this report into an other report (as a sub-report) this event
function is never called.

I see when I add some msgbox statements that the Report_Open() function of
this sub form is called, but not Report_Activate() function.

I need the Report_Activate() event because in Report_Open() I can't use this:

Dim objChart As Object
Set objChart = Me!MyChart.Object

I can use this in Report_Activate().

Anybody an solution for this?

In addition to Dave's comments about the Activate event not firing
when used in a sub-report, be aware that the Activate event, even on
the Main report will only file when the report is Previewed. It does
not fire when the report is sent to the printer.
You might try placing your code in the main report's Report Header
Format event which will fire both when previewed and when sent to the
printer.
 
Good point fred, but you do have to be aware that report section format
events may fire multiple times. For example, if you preview the report, it
will fire at least once. Then if you print from the preview, it will fire at
least one more time.
 

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

Back
Top