• Time out for users (Access 97)

    Author
    Topic
    #373704

    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

    Viewing 2 reply threads
    Author
    Replies
    • #601589

      Have a look at this post

    • #601743

      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.

    • #601745

      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

      • #601786

        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

        • #601788

          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.

    Viewing 2 reply threads
    Reply To: Time out for users (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: