Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Time out for users (Access 97)

    I have a database that is being used by several hundred people. I usually do maintenance at night but lately, I have people still logged into the database. I do not have access to the server to remove them. Is there a way to automatically exit them if the program is idle for a time period. I have done this before on a form but it left them in the program. Will it corrupt any data? Is there a way to automatically do a compact to the same file name?

    Thanks in advance!

    Deborah

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time out for users (Access 97)

    Have a look at this post
    Francois

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time out for users (Access 97)

    http://www.peterssoftware.com has a sample database that does exactly this. I've been using the process shown in the attachment and it has solved the problem of users leaving the database open and not being able to do maintenance.

    To compact a database externally using the same name, you can run a simple batch file (text file with a ".bat" extention) as follows:

    "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "C:My DocumentsHISTORY_RESEARCHHISTORY_FFY01_02.mdb" /compact"

    Substitute your own paths for your msaccess.exe file and taget database.
    Attached Files Attached Files

  4. #4
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time out for users (Access 97)

    In my reply I had one to many double quotes....the ".BAT" file should look like this:

    "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "C:My DocumentsHISTORY_RESEARCHHISTORY_FFY01_02.mdb" /compact

  5. #5
    Star Lounger
    Join Date
    Feb 2001
    Location
    South Carolina, USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time out for users (Access 97)

    I checked out the attachment and I think that will work great. I have a few questions before I implement this process into my database.

    Will it work if I attach it to the switchboard?
    If they have another form open and they are idle - will it still boot them out if I attach this to the switchboard?

    I am so afraid that it might cause problems. Is there a need to be concerned? I reallt need it to work because the database is getting rather large and slow.

    Thanks,
    Deborah

  6. #6
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time out for users (Access 97)

    Actually, all you need to do is copy the form "frmInactiveShutDown" from the example and place it in your database as is, then make sure it is being opened HIDDEN (either by code or an Autoexec Macro) on database startup. That's all you need to do unless you want to change the inactive time - it's set to 30 minutes in the "ON OPEN" event, with a 1 minute warning until shutdown.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •