Results 1 to 3 of 3
  1. #1
    Glenn_Suggs is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    72

    Code to disconnect users while update is running

    Hello everyone. This will probably sound like an unusual request, but I have been asked to disconnect users that have left their PCs logged on and running a certain Access application. The application has a nightly update routine so as to not conflict with other stuff running on the system, but sometimes users leave the network-based app running on their machines and this results in the update not running to completion. Does anyone know of a way that the app can programmatically detect this situation, possible using the .laccdb file and the "Machine name" information it contains to accomplish this task? I'm thinking it's going to be tricky because some of the info in the laccdb file seems unique while others (four of them today), only say "Admin".


    Thanks in advance... Glenn

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,863
    You could have a table of users on the BE that indicated who was logged in. In that table you could have an additional Boolean field that would indicate if a given user is in the middle of a process that requires completion before logging off. In my DB's I often have processes, that once started, are required to be completed before the user closes the form and or closes the DB.

    Another approach would be to look for the lccdb file on the client machines before closing that FE file DB.

    What I do is use script on a non-related machine to do a backup of the BE file regardless of who is still logged in. I have another script that looks for the lccdb file on the server. If the lccdb file does not exist on the server, I then run script to do a compact and repair on the BE file.

  3. #3
    Glenn_Suggs is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    72
    Quote Originally Posted by ItsMe View Post
    You could have a table of users on the BE that indicated who was logged in. In that table you could have an additional Boolean field that would indicate if a given user is in the middle of a process that requires completion before logging off. In my DB's I often have processes, that once started, are required to be completed before the user closes the form and or closes the DB.

    Another approach would be to look for the lccdb file on the client machines before closing that FE file DB.

    What I do is use script on a non-related machine to do a backup of the BE file regardless of who is still logged in. I have another script that looks for the lccdb file on the server. If the lccdb file does not exist on the server, I then run script to do a compact and repair on the BE file.
    Thanks for the response. You have some good ideas here I think. I will try implementing part or a combination of them. They make a lot of sense. Thanks again.

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

Similar Threads

  1. Replies: 7
    Last Post: 02-26-2014, 07:12 PM
  2. Replies: 3
    Last Post: 11-06-2013, 01:59 PM
  3. Replies: 1
    Last Post: 12-13-2012, 01:41 PM
  4. Running Access for multiple users
    By itm in forum Access
    Replies: 2
    Last Post: 09-08-2011, 08:29 AM
  5. MultiUser DB ... Some users can't update tables
    By gopherking in forum Programming
    Replies: 1
    Last Post: 08-24-2011, 08:01 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 - Senior Forums