Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    29

    Unanswered: running code on exiting

    Hi there,

    I want to run some VBA code when the user exits the Access database. I could do this on the Form_Unload event of the main form but i'm not sure this will be executed all the time (sometimes i'm not on the main form when i close the database). Are there standard way to execute code when exiting an Access database?
    Bye,

    Jeroen

    A 3D editor project
    www.delgine.com

  2. #2
    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    29
    Never mind, I found a solution. Simply create a form and open it when you open your database. Make it a hidden form which will stay in the background while your database is running. When you close the database, the Form_unload event of the hidden form is executed also and that is the place to insert any code you want to be run when exiting the database. Works like a charm!
    Bye,

    Jeroen

    A 3D editor project
    www.delgine.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •