PC Review


Reply
 
 
DS
Guest
Posts: n/a
 
      28th Jul 2008
I want to add code that executes when my database closes. The database can
close from any number of places, so I would just like to add this globally
so to speak. Is this possible? If so where can I place this code without
having to add it to each and every from.
Thanks
DS


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      28th Jul 2008
"DS" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I want to add code that executes when my database closes. The database can
>close from any number of places, so I would just like to add this globally
>so to speak. Is this possible? If so where can I place this code without
>having to add it to each and every from.


Since there is no application close event, the usual workaround is to open a
hidden form and use its Unload event.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      28th Jul 2008
DS wrote:

>I want to add code that executes when my database closes. The database can
>close from any number of places, so I would just like to add this globally
>so to speak. Is this possible? If so where can I place this code without
>having to add it to each and every from.



If the first thing your db does is open a hidden form, then
that form will be the last thing to close. You can then use
that form's Unload event (can be canceled) or Close event to
run your code.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
DS
Guest
Posts: n/a
 
      28th Jul 2008
Thanks Allen,
I was afraid of that.
DS



 
Reply With Quote
 
DS
Guest
Posts: n/a
 
      28th Jul 2008
Thanks Marsh.
I'm using this to hide the mouse.
What happens if I don't do show mouse. It reappears when I close Access.
But is this bad. Since I'm hiding it do I need to reshow it?
Thanks
DS


 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      28th Jul 2008
DS wrote:
>I'm using this to hide the mouse.
>What happens if I don't do show mouse. It reappears when I close Access.
>But is this bad. Since I'm hiding it do I need to reshow it?



I'm pretty sure that the mouse pointer is tied to the
applcation so whatever you do in Access should not affect
other programs.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
DS
Guest
Posts: n/a
 
      28th Jul 2008
Great. It does seem to work that way.
Thanks
DS


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 Disable Close and Close All on Tabbed Documents MumHeb Windows Vista 0 6th May 2010 05:36 PM
error in running workbook.close() func. after close excel from win Kayıhan Microsoft C# .NET 0 29th Mar 2009 12:49 AM
Clear Checkbox field on close of form or close of report =?Utf-8?B?QnJvb2s=?= Microsoft Access Form Coding 2 14th Jan 2006 09:31 PM
Excel shoud not close all active books when clicking close button =?Utf-8?B?dGVjaG5vbWlrZQ==?= Microsoft Excel Misc 0 10th Jun 2005 05:35 PM
Close all programs / Shut Down windows does not auto close outlook =?Utf-8?B?TUtlcw==?= Microsoft Word Document Management 2 22nd Aug 2004 11:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:36 PM.