Results 1 to 5 of 5
  1. #1
    howlettb is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    20

    Not allowing database to close with X in upper right corner


    I think this is an easy question ... but I can't figure it out. I don't want the the Close (X) option in the upper right hand corner of the database. I want the database to only close by clicking a close button on a form that I create. How do I remove that X? Thanks to anyone that can help.

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Not sure what the difference is. If you have OnClose procedures running, closing the database is the same as closing the form. Let us know what your requirements are.

  3. #3
    Roncc is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Dec 2017
    Posts
    85
    If you just want to close the form: with the form in design view, go to the form properties format tab where you will find the property "Close button". Left-click on the space next to the words "Close button" and select "No" from the dropdown list. Save your form and you're good to go. If you want to close the entire database, place a button on your form when the "What do you want to happen when the button is pressed" dialogue box opens, highlight the Application category and select Quit Application from the "Actions:" window.

  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Here is a old link that answers your question: https://access-programmers.co.uk/for...d.php?t=148061

    Please note that you can close Access in more than one way (the x you mention, File/Close, right clicking the icon on the taskbar), so the safets method to force users to exit your way is to use the unload event of a form that is always open and set the Cancel=true if the user has not clicked your button.

    Cheers,
    Vlad

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I don't think you can remove it, but there are examples of how to disable it. Apparently, those solutions can be version specific. See
    https://support.microsoft.com/en-us/...w-and-the-exit
    http://www.fmsinc.com/microsoftacces...eventclose.asp
    etc.
    If your db process execution dies, you could find yourself with no way to close the app other than Task Manager. May ever not happen - just sayin.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 0
    Last Post: 12-28-2016, 01:04 PM
  2. Replies: 1
    Last Post: 12-21-2016, 09:35 AM
  3. Replies: 10
    Last Post: 02-26-2016, 03:19 PM
  4. Replies: 2
    Last Post: 10-10-2014, 06:27 AM
  5. Replies: 5
    Last Post: 09-01-2014, 12:11 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