Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    That code goes in a general module I named Customization.

    It gets called behind form that opens by default when db opens. For my purposes, the line is:

    If Me!Permissions <> "admin" Then Call SetAccessXCloseButton(False)

    Yes, I was confused. I thought you meant the Close action by click on the A icon at top left of app window.



    Sorry, I have nothing for the Windows taskbar other than possibly hiding the Access app window (I never implemented) https://stackoverflow.com/questions/...nd-and-taskbar
    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.

  2. #17
    data808 is offline Noob
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2012
    Posts
    727
    Quote Originally Posted by June7 View Post
    That code goes in a general module I named Customization.

    It gets called behind form that opens by default when db opens. For my purposes, the line is:

    If Me!Permissions <> "admin" Then Call SetAccessXCloseButton(False)

    Yes, I was confused. I thought you meant the Close action by click on the A icon at top left of app window.

    Sorry, I have nothing for the Windows taskbar other than possibly hiding the Access app window (I never implemented) https://stackoverflow.com/questions/...nd-and-taskbar
    No worries @June7. Thanks for trying. I think disabling the taskbar for closing the app is almost impossible. So when you said you had a solution for it, I was very excited to see if it would work. The other thing in Access that bothers me is the MDI window. I think I heard there is a way to completely get rid of it but I'm not sure how to do that. Right now I always have it minimized but it will pop back up occasionally if the user left clicks on the Access icon in the taskbar or some other scenarios like opening a split form maximized, it will bring up the MDI window behind so I always do code to try and hide that thing whenever I can and also a few minimize MDI window buttons scattered throughout the app for the user to click on if the MDI window is being annoying or in the way.

    Your "Cancel = True" did help with the scenario of the undo happening if the user clicks no when asked to save changes but then I get other errors if I repeat it again or try another scenario. I think I am just going to surrender and keep my original code as it has worked for the most part. It just didn't prompt the user when they close by taskbar to let them know that changes are going to be saved whether they like it or not. It would have been nice to be able to have at least a message box to tell them that but ultimately, if it could ask if they wanted to save the changes would have been ideal. I just can't believe Microsoft did not give a simple solution for such a common scenario.

    Thanks everyone for trying to help.

  3. #18
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Have a read of this / look at the video - it's a really good take on validations and the Before update event.
    https://www.access-programmers.co.uk...-and-2.324342/
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. After Update Event
    By d9pierce1 in forum Programming
    Replies: 3
    Last Post: 10-21-2021, 08:15 AM
  2. Replies: 1
    Last Post: 09-27-2019, 10:58 AM
  3. Replies: 6
    Last Post: 11-05-2014, 05:27 PM
  4. Replies: 7
    Last Post: 05-08-2014, 10:34 AM
  5. VBA in Before Update Event
    By data808 in forum Access
    Replies: 1
    Last Post: 02-21-2014, 07:15 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