Kill connection on MS Access database

Does anyone known if there is a utility or simmilar to kill a user connection to a MS Access 2000 database?

I have a database in a network and many users who only have read access.

If, for any reason, I need to make a little change in a Form or to repair and compress, etc., etc I have to ask everbody who is connected to get out and when all of them are out I can take the control.

And if someone is not in their desk I can´t close the application until he comeback.

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Firstly, I would not let the users share your FrontEnd App. Personally I would copy the front end to the local PC rather then get then run the front end across the network. When you have done your development changes then release a new version to them when you are ready.

With regards to your actual problem, Windows NT (and I assume Novell does also) has the facility to check who is locking the file and you can then force them off.

Cheers, Andrew
I agree with TexReport. Leave the users alone. Do your changes on another database and release it at night. Same for the compacting.

You can use Control Panel/Computer Management/Shared Folders/Sessions to see who is connected and kick them out, but I would not recommend doing so: This is rude.
dspeierAuthor Commented:
The problem is that I don´t have Administration rigths on the NT server where is the database running.

Don´t you know any utility to do so? or to send a messagge to the user thru the access?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

You can use the NET SEND command, something like:

net send <username> "Please close your database, I need to do some maintenance. Thanks"

You could also develop something more sophisicated: A hidden form with its Timer Event reading a table. When the value of this table is changed, make the form visible, wait for a few minutes and close the application.
Although the LDB file will indicate which PC is locking the file it will not indicate the username, you need to pass it on to your network administrater to "kick them out".

Other options to think about are:-

1. An AutoClose procedure if the user hasn't done something for a specified amount of time.
2. A messaging routine to all current users logged in.

Both of these can be achieved using the OnTimer event of your main form.

Cheers, Andrew
I agree totally with the others.  Your application should be split into a backend and several frontends.  The following technique will work either way, however.  The form with the timer event needs to be running on the user's machine (either through the shared application or their own frontend).

Here is some code I use in one application.
It requires:
One table, a timer form and a message form, a snippet of code.

1. Create a new (timer) form, set it to open and hide on startup of the application.  Leave it open always.  Attach the code to the form's Timer Event and set it to "look" every couple of minutes. My timer is set to 3 minutes, but yours could be anything.

2.Create a simple form (for the message) that has a label with a message in it tht the sytem will be shut down.

3.Create a table (U BUMP).  It only needs 2 fields (BUMPLVL and BUMP). Bumplvl is only used to "help" the dlookup, put a 1 in it.  The table should be a linked table which the administrator has access to OR if the application is a single shared app, it needs to be in the database that all the users are using.

USAGE/LOGIC: When desired, the administrator opens the table (u Bump)and changes the value of the field "Bump" to WARN.  When the code runs, it sees that value and causes a message form to open (the form basically says get out 'cuz the application will be shut down in 5 minutes.)
Five minutes later, the Administrator then sets the value of "Bump" to NOW.  When the form's timer sees that the value is NOW, it runs the quit command closing the DB.

Private Sub Form_Timer()
   Dim bumpout As String
   bumpout = DLookup("bump", "u bump", "bumplvl=1")
   If bumpout = "Warn" Then
   DoCmd.OpenForm "bump message"
   ElseIf bumpout = "Now" Then
End If

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dspeierAuthor Commented:
Thank you very much to all of you. I will use your advices and will try to do what Volibrawl said.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.