Results 1 to 8 of 8
  1. #1
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125

    How to disable the "close" button in Access

    I have a db with a security system which requires that users should press the command botton "Log Out" so that is records the time they exit the system. When users use the "Close button" in Access, it is impossible to track when they exited the system.



    What i want now is to be able to disable the close button so that there have only the one option. That is the command botton "Log Out".

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Should be the same in A3007, but in A2010 you can open the form properties dialog box and click on the Format tab.

    Look for "Close Button" and change the Yes to No. The "X" will still be displayed, but won't close the form.

    If you want the "Min/Max/X" to be not visible, change the "Control Box" property to NO.

  3. #3
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125
    Actually am not talking about the Close button on the form. Am talking about the close button of MS Access.
    Thats the close button of the MS Access GUI

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK.... I remember reading about this a long time ago....

    Found it! See "The Access Web" site

    "Prevent Access from closing"
    http://access.mvps.org/access/general/gen0005.htm

  5. #5
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125
    Actually i have tried to understand what is really recommended there but i dont seem to get it very right understanding.Is there a possibility of having a sample db that illustrates this?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What I do, if it helps, is open an invisible form with the Autoexec macro. This form is my "housekeeping" form and will be the last form to close unless the user uses the three finger salute. With it you can keep your applications from closing if you want; but you can also do last minute clean up and posting.

  7. #7
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125
    Please if some one can upload a sample db concerning this i will be very grateful.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Follow instructions in the link given by ssanfu. Create the public declaration for the Boolean variable in a general module. It goes in the header. The default value of a Boolean variable is False. Then create the procedure behind form.

    There is another method that uses API calls but it is a bit more complicated code and less flexible. http://support.microsoft.com/kb/245746
    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. Replies: 30
    Last Post: 09-27-2013, 01:34 PM
  2. Disable "X" button everywhere
    By rumenrs in forum Access
    Replies: 4
    Last Post: 06-13-2013, 11:44 AM
  3. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  4. Disable security warning to "enable content"?
    By Heatshiver in forum Security
    Replies: 2
    Last Post: 02-03-2012, 02:26 PM
  5. Replies: 0
    Last Post: 01-11-2012, 12:34 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