Execute Function on Access Application Close 
Author Message
 Execute Function on Access Application Close

When your database opens, have it open a hidden form. Put code in that
hidden form's OnClose event that will cause the information to be written
into the table. When ACCESS closes, it closes all open forms, and that will
trigger the form's code to be run before the database closes.

Hoping that this is helpful...
       Ken Snell

> Basically all I want to do is write to a log file, when a
> user enters or exits my access database, recording
> username and time logged on/off to the Access database.

> My problem is I do not know how I can perform code
> execution if the user closes Access from the Quit
> Application click box on the Main Menu bar.  I easily can
> have my code executed with a command button for Quit
> Application. But for those users who bypass the command
> button and use Application Close box on the menu bar, I
> can seem to figure how to execute this code for that
> action.  Most people just close out the Access database
> rather than use the Quit Command button I have on my main
> form.

> Anyone have any ideas?
> Thanks.
> William

Sun, 15 May 2005 11:36:45 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Closing an application executed using SHELL

2. Sendkeys function not when executing mail application ???

3. Sendkeys function not when executing mail application ???

4. How to execute a oracle function in Access(VBA)

5. executing Access query containing a user-defined function through VB

6. Executing Access query that uses functions

7. Executing MS Access Code from VB application

8. Executing Access query containing a user-defined function through VB

9. Waiting for an application to finish executing before executing next app

10. Access Application does not close

11. Run a function when Access closes.

12. Quitting Application won't close Access 7.0


Powered by phpBB® Forum Software