Results 1 to 2 of 2
  1. #1
    guillermoftw is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2014
    Posts
    13

    Run Code on Closing of DB

    Hello All,

    I am trying to automate backups on my DB to run once Access closes. So far I've only been able to figure out how to do it when it starts up not when it closes. Any suggestions?



    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The code must be behind a form close event. I would set up a form that never closes, such as a main menu. When the app closes, the form will close and the event will trigger.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Code for closing all opened forms
    By gstylianou in forum Access
    Replies: 9
    Last Post: 06-30-2014, 01:35 AM
  2. closing form
    By joshynaresh in forum Access
    Replies: 6
    Last Post: 02-05-2014, 09:06 AM
  3. Closing mask if non-zero value
    By sergran in forum Programming
    Replies: 2
    Last Post: 09-19-2013, 11:45 AM
  4. Issue w/ VBA code for Opening/Closing Forms
    By need_help12 in forum Forms
    Replies: 5
    Last Post: 04-20-2012, 11:09 AM
  5. Compacting When Closing?
    By Sean04 in forum Access
    Replies: 5
    Last Post: 03-19-2010, 01:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums