Improper Closing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbeers
    New Member
    • Nov 2007
    • 63

    Improper Closing

    Good morning.

    I am using Access 2007 with all users running runtime. I created a login table that functions very well by adding logins and deleting logins as people log in and out of the application. However, many users, inspite of my many emails, insist on just closing out the program by "X" the whole window rather than using the appropriate "Quit" buttons on the form. When the user just closes the whole program, the logon data is not deleted as it is when using the proper "quit" buttons.

    Is there a method to either:
    1. Force the user to use the apprpriate buttons to exit the program or
    2. Programatically run my "macDeleteLogge dOn" macro when somebody just clicks the "X" in the upper right hand corner.

    Thanks

    -Tomb
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    ACC2000: How to Disable the Close Button (X) on the Access Application Window
    How to disable the Close button on the Application window and the Exit command on the File menu
    Disable Application Close [X] Button
    and so on ...

    Regards,
    Fish.

    Comment

    • puppydogbuddy
      Recognized Expert Top Contributor
      • May 2007
      • 1923

      #3
      If you are just talking about the control box X on the Access form, you can set the control box property to No on the form's property sheet. If you are talking the control box x in the application window that appears the upper right of most windows applications, there are several methods available. The method I think is one of the more complete is available as a demo download at this link:
      Here is a sample Access 97 db that will show you how to disable and/or enable the control box X button that most Windows programs have in the upper right corner. Sometimes we do not want our users to exit a database unless they have clicked our custom exit button. Disabling the X button will...

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        When the application is closed using the X, your open forms still run the Form_Unload(Can cel As Integer) event. You can put your code there, if you have a form that should always be open, like a menu.

        Comment

        Working...