Results 1 to 4 of 4
  1. #1
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65

    Button to exit access completely

    Hello, I am trying to make a button that I can put in my form that will close out of Access completely. Currently I have DoCmd.Quit acQuitSaveAll


    but all that does is close the form within the navigation pane, and not the navigation form itself, or the MS Access 2016 program.

    I'm doing this because I have my main navigation form open in full screen to hide the back end.

    (On another note- My forms aren't actually opening maximized, even though I have DoCmd.Maximize in their loadup setting, any thoughts?)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    DoCmd.Quit works for me - closes the app. Why do you use acQuitSaveAll insteadof acQuitSaveNone? The Save is to save db design changes. I only want to allow that if I (the admin/developer) opens the db. So I have a Users table and code that identifiers the user and their permissions. So my Quit code is:

    DoCmd.Quit IIf(Me!Permissions = "admin", acQuitSaveAll, acQuitSaveNone)

    I don't understand what you mean by 'hide the backend'. How does maximizing form hide backend?

    I don't set forms maximized but I just tested the code and it worked.
    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.

  3. #3
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65
    I want to hide the ability to change design or tables directly, leaving only the form interface visible so that the users don't mess with anything they shouldn't. That's what I meant by that.

    Also, my form doesn't seem to want to actually go full screen. I have "Fit To Screen" as "Yes" but that doesn't seem to do anything!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I set up db with Navigation Pane hidden, disable right click shortcut, disable function keys, disable all X close including the app, customized ribbon that removes File>Exit. It's complicated but works unless users know the shift key bypass. I've never taken the extra step of distributing accde version.

    Is your db split design (frontend and backend)?

    I've never used 'maximize' or 'fit to screen'.
    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. Coding problem with Exit button
    By NightWalker in forum Programming
    Replies: 11
    Last Post: 06-06-2016, 01:05 PM
  2. Replies: 3
    Last Post: 03-27-2013, 02:17 PM
  3. Replies: 2
    Last Post: 12-20-2012, 03:06 PM
  4. Replies: 7
    Last Post: 11-23-2011, 08:14 PM
  5. Replies: 9
    Last Post: 08-06-2011, 02:10 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