Results 1 to 2 of 2
  1. #1
    atran is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    4

    OnClose event and exit/quit buttons

    Hello,

    Here's my set up:

    I have a form (menu) that auto-loads along w/ the database that has a standard exit button at the bottom. On that form/menu, one item/button loads a table for editing (we'll call this 'edit table' button). I want a prompt to pop up asking whether or not the user would like to export the table to excel on exit, only when a user loads the table, regardless of whether other items from the menu are loaded during the session. As of right now, I have a hidden form that loads when the 'edit table' button is clicked and I have an OnUnload event set on the hidden form to load an 'export to excel' form/prompt (loaded as dialog, form set to popup & modal). When I test this out by closing the hidden form (clicking it's 'x', or the 'exit' button on my main menu or access' 'x'), the 'export to excel' form loads beautifully and the 'export to excel' button works great except my other button on that form, the 'exit' button, does not work at all. The exit button is set to 'quit -> prompt'. This is completely nitpicking, but how do I get this 'quit' button to work. Clicking on that form's 'x' button closes that window and continues the exit and I could just write I note saying 'click the x to exit', but I'd rather figure out what's broken here and fix that exit button. If I set that button to 'quit -> exit' I get an action failed error # 2950.



    Thanks for reading this far in a long explanation for such a tiny problem.

  2. #2
    atran is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    4
    I've also tried to set the 'exit' button to 'runcommand -> close*' and it works, but I get this error message: 'Microsoft Office Access has encountered a problem and needs to close. We are Sorry for the inconvenience, etc.' and it asks if I want to send an error report or not.

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

Similar Threads

  1. onclose event
    By imintrouble in forum Forms
    Replies: 14
    Last Post: 10-18-2011, 08:10 PM
  2. How do I capture Access DB exit event
    By jscriptor09 in forum Access
    Replies: 3
    Last Post: 09-21-2011, 09:45 AM
  3. Replies: 11
    Last Post: 07-27-2011, 05:51 PM
  4. Replies: 7
    Last Post: 03-15-2011, 11:14 PM
  5. The command or action Quit isn't available
    By Macallan60 in forum Access
    Replies: 0
    Last Post: 04-26-2010, 09:59 AM

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