in which report object event does a certain activity occur?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mirandacascade@yahoo.com

    in which report object event does a certain activity occur?

    Apologies in advance...I'm sure this is a trivial question...

    Access 97.

    Situation is this:
    1. VBA code sets the recordsource property of a report object; the
    recordsource is a querydef which is an SQL Server stored procedure
    2. VBA code does DoCmd.OpenRepor t specifying the report whose
    recordsource property was set as described in #1
    3. report opens/displays as expected

    My questions are:
    1) at what point in the process does the stored procedure get
    invoked?
    2) does the stored proc get invoked as soon as the report object's
    recordsource property get set? (based on what I observed when stepping
    through in debu, I'm guessing it does NOT get invoked when the
    recordsource property gets set)
    3) does the stored proc get invoked in one of the report object's
    events that fire when the DoCmd.OpenRepor t statement gets executed?
    If so, which event: Open, Load, Activate, Current?

    Thank you.

  • Tom van Stiphout

    #2
    Re: in which report object event does a certain activity occur?

    On Fri, 22 Feb 2008 09:42:34 -0800 (PST), mirandacascade@ yahoo.com
    wrote:

    1: I'm pretty sure it's when you open the report, after the Open event
    and before the Load event. Step through your code in the debugger, and
    have SQL Server Profiler running at the same time.
    Then report back to us so we can all learn.

    Thanks,

    -Tom.


    >Apologies in advance...I'm sure this is a trivial question...
    >
    >Access 97.
    >
    >Situation is this:
    >1. VBA code sets the recordsource property of a report object; the
    >recordsource is a querydef which is an SQL Server stored procedure
    >2. VBA code does DoCmd.OpenRepor t specifying the report whose
    >recordsource property was set as described in #1
    >3. report opens/displays as expected
    >
    >My questions are:
    >1) at what point in the process does the stored procedure get
    >invoked?
    >2) does the stored proc get invoked as soon as the report object's
    >recordsource property get set? (based on what I observed when stepping
    >through in debu, I'm guessing it does NOT get invoked when the
    >recordsource property gets set)
    >3) does the stored proc get invoked in one of the report object's
    >events that fire when the DoCmd.OpenRepor t statement gets executed?
    >If so, which event: Open, Load, Activate, Current?
    >
    >Thank you.

    Comment

    Working...