Results 1 to 6 of 6
  1. #1
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    How to shutdown Access if User has it idle for given time

    I've been doing a huge amount of programming and updates to my database and now I'm running into the problem where I cannot update my DB because users are keeping it open when they go home for the evening.
    Does anyone have some VB that will close and shutdown the DB if the user has it idle for a given time?
    This DB does not allow the users to add or edit data, it only provides graphs and trends for a thermal plant operation. PLC's are sending data to a SQL DB and Access is used for my front end.
    Any help would be appreciated,

    Mike

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Multi-user db should be split design. Each user should run their own copy of frontend. You have a master for editing purposes then distribute new version.

    What is PLC?
    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
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    A PLC = Programmable Logic Controller.
    I do have a Master for editing but for me to distribute it I need the users to close out so that I can update the currently used DB. I then delete, save the revised DB on the Network, to the same file with the same name so that all the users shortcuts on their desktops continue to open the DB.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    I faced this question long time ago and gave up. Seems its not too difficult to determine that Access is running but determining what file(s) are open is not. What I discovered is, essentially, closing the db means killing the app and you could really upset some users. Just because Access is running doesn't mean it's your database.

    In my db, code automatically downloads new version if needed when user opens frontend. When I deploy new version, I don't worry if they still have their copy open unless I know there are design edits that would cause their current version to fail. In which case I do edits when everyone is gone and I know all frontends are shutdown. I have code that records each user login and logout into a table so I know if there is one sitting open. Every user is just a few steps away so if I do have issues I can yell at them. Review https://www.accessforums.net/code-re...end-33331.html
    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.

  5. #5
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Okay, This makes some good sense. And honestly would be a better way than what I was trying to do.
    I will review the attached thread and see how I can get it to work for me.

  6. #6
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156
    I found this while searching for some codes I needed a while back: https://www.accessforums.net/code-re...life-7572.html. I'm planning to use it on my projects, but I haven't gotten far enough along with them to do it, so I haven't personally tested it. Everyone in the thread seems to love it though, and it sounds like it might help with your problem.

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

Similar Threads

  1. Replies: 13
    Last Post: 11-18-2013, 02:20 PM
  2. Replies: 1
    Last Post: 09-21-2013, 10:42 PM
  3. 2010 Runtime, 1st Time User Needs Help
    By bobduncan43 in forum Access
    Replies: 1
    Last Post: 01-17-2013, 01:19 PM
  4. Replies: 0
    Last Post: 12-03-2010, 12:56 AM
  5. Access won't shutdown
    By farlowj in forum Access
    Replies: 3
    Last Post: 07-10-2009, 06:55 AM

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