[AccessD] Re: Detecting when an Access Report has been closed

Robert L. Stewart rl_stewart at highstream.net
Wed Mar 17 13:10:34 CST 2004


Rick,

The simple way would be to set the value
of a global variable.

In the OnClose event of the report:

gflgReportClosed = True

In the OnOpen event of the report:

gflgReportClosed = False

In a regular module declarations section:

Public gflgReportClosed as boolean

Now, you can check from anywhere in the
program to see if it is open or closed.

Robert

At 12:00 PM 3/17/2004 -0600, you wrote:
>Date: Wed, 17 Mar 2004 09:30:06 -0800 (PST)
>From: Dick Abo <orthorabod at yahoo.com>
>Subject: [AccessD] RE:  Detecting when an Access Report has been
>         closed
>To: accessd at databaseAdvisors.com
>Message-ID: <20040317173006.82738.qmail at web13009.mail.yahoo.com>
>Content-Type: text/plain; charset=us-ascii
>
>Charlotte:
>
>A few days ago I posted a question dealing with the detection of when an 
>Access 2K generated reported has been closed by the user.  I was referred 
>to the WithEvents keyword and sinking the close event of the report.  I've 
>checked out some info in A2K on-line help and in the A97 ADH referencing 
>the topic of the 'WithEvents' keyword.
>
>The examples dealt with event sink classes for Microsoft Word and a 
>'frmWithEventsWatch' form. I'm not sure how automating to MS Word affects 
>an Access generated report. It appears to be more in-depth that I would 
>like to go at thie time.  I expect that this may be the only time that I 
>will ever have to use this method.
>
>I also attempted to search the archives using 'WITHEVENTS' as the search 
>key, but I seemed to be unsuccessful at pulling up related examples and 
>material.
>
>Is there some sample code out there that deals with this topic and that 
>doesn't get too deep?
>
>Regards,
>
>Rick Abo





More information about the AccessD mailing list