Christopher Hawkins
clh at christopherhawkins.com
Thu Dec 4 10:34:47 CST 2003
I had forgotten about that. That might be the clue I need to debug this problem without having to worry about the application's Close event. Thanks Alun! You too, John. -C- ---- Original Message ---- From: Alun.Garraway at otto.de To: accessd at databaseadvisors.com, Subject: RE: AW: [AccessD] Capturing the application's Close event Date: Thu, 4 Dec 2003 17:21:33 +0100 >I think the hidden form must also be the first you open, >because Access closes the forms in the order they opened when >shutting down. > >alun > >-----Ursprüngliche Nachricht----- >Von: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com]Im Auftrag von John W. >Colby >Gesendet: Donnerstag, 4. Dezember 2003 17:08 >An: Access Developers discussion and problem solving >Betreff: RE: [AccessD] Capturing the application's Close event > > > >One way to do this is to: > >1) Create a global blnAllowClose >2) Open a form hidden. >3) In the form OnClose place a > > Cancel = blnAllowClose > >4) Set blnAllowClose = false when the form opens. >5) In your app, in the button or whatever you use to close the >database, set >blnAllowClose = true > >It turns out that Access can't close when an object remains open. By >setting up the hidden form and not allowing it to close until your >global >variable says it can, you have effectively prevented the form from >closing, >which prevents ACCESS from closing. > >John W. Colby >www.ColbyConsulting.com > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Christopher >Hawkins >Sent: Thursday, December 04, 2003 10:59 AM >To: accessd at databaseadvisors.com >Subject: [AccessD] Capturing the application's Close event > > >Hola! > >I have inherited an Access application (those words alone should >alert you that nothing good is going to follow in this message) that >is exhibiting strange behavior when the user exits by clicking the >Close button on the Access shell. > >I'd like to be able to capture and stop the Close process when the >user attempts to exit this way. I have Googled, but to no avail. > >Anyone know how to do this? > >-Christopher- > > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > >