Results 1 to 10 of 10
  1. #1
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122

    Disable Program Close Button


    Is there a way to hide or disable, not the form close button, but the MS Access close button?? See attached image.Click image for larger version. 

Name:	Capture.JPG 
Views:	25 
Size:	23.4 KB 
ID:	38223

    Thank you in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Another method would be to remove the application window completely which removes the title bar, ribbon, quick access toolbar and navigation pane.
    This leaves you with forms 'floating' on the desktop. See http://www.mendipdatasystems.co.uk/c...ace/4594365418
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122
    Ty both!!

    Another question, if user use Control-Alt-Delete to quit an application, I am fine with that, but, can a certain code be executed prior to access closing? Just wondering.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    If you remove the db close button, no doubt you'd provide a command button instead? You can run any code in its click event. I would not promote the idea of keyboard key combinations to close the db. You might want to consider a hidden form that has close event code, which I think is about the only way to deal with the possibility that users might find inventive ways to close the db that you don't expect.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Whilst you can run any code you want prior to an orderly shut down, if you use ctrl alt del, all of that code will be bypassed.
    As Micron has already said, make sure you provide a shut down button which cannot be bypassed.
    If necessary disable the three fingered salute...but this requires a registry hack.
    Don't forget other key combinations that shut down Access such as Alt+ F4
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    People would actually employ this method and close all apps and potentially sign off rather than perform orderly closing? I'd be logging them in anyway, so if I thought that might be the case, I'd check if they're already logged in on startup. If so, they had an abnormal shutdown and after logging a few of those I'd be ragging on them - at least.
    To disable the key combination would mean a basic Windows functionality is removed - a sure fire complaint generator, assuming anyone needed to ever use it.

  8. #8
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122
    TY all for the replies. I see your point. No, I was just wondering if there is a way whenever access shut off, I log someone off. (currently, I have all the above in place, i.e. disable Window Close X, a close button that will change a value to indicate someone is log off...) the only problem I can not prevent is, when the database got frozen, sometimes due to network issues, someone will have to use the Ctrl-Alt-Del to exit. Then, it messes up the log to track who is currently log-in. Well, this does not happen often, so, I don't have to worry, I guess.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Is this db split and does the fe reside on a server and the fe on each user's pc? On one hand it sounds like it's not split, but on the other hand, you seem to be concerned about a db that everyone would have lost a connection to, thus likely you couldn't tell who's in and who's not because you would have lost connection also. Unless you needed exclusive access to the be (back end) I'm not sure I get why it would matter who didn't log out if it was split. You'd be able to gain access anyway, so it's a bit of a conundrum.

  10. #10
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122
    Micron, ty so much for your help. Yes, it is a split one, FE in local machines; BE in the server. The reason why I would like this is that I tried to monitor who had use the database and how long they had been using it. No worry, this is not a big deal.

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

Similar Threads

  1. Disable close button in appliction window
    By Jen0dorf in forum Access
    Replies: 4
    Last Post: 08-20-2016, 03:44 PM
  2. How to disable just close button but keep min/max?
    By mjhd786 in forum Programming
    Replies: 2
    Last Post: 02-19-2015, 02:37 PM
  3. How to disable the "close" button in Access
    By Demerit in forum Access
    Replies: 7
    Last Post: 12-08-2013, 07:08 PM
  4. Disable master form close button
    By Carpy01 in forum Forms
    Replies: 3
    Last Post: 12-31-2010, 05:41 PM
  5. Disable App Close button in 2007
    By ajetrumpet in forum Programming
    Replies: 3
    Last Post: 09-05-2010, 11:32 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