Anyone have any tricks to force close the database for users from the database when doing a data update macro?
Anyone have any tricks to force close the database for users from the database when doing a data update macro?
docmd.quit
for users that are associated to a group?
We shouldn't have to play 20 questions here. What are you trying to accomplish? We can't guess.
I would like to also add a kill function so when I run my update macro the users that are logged in the database will be forced closed. Allowing me exclusive access to the database.
It's not a trivial issue. Here are some ideas from a Google search.
http://accessjitsu.com/2016/10/01/mi...ses-to-logout/
http://p2p.wrox.com/access/5015-forc...plication.html
http://www.granite.ab.ca/access/ufad.htm
You ought to give serious consideration to this idea if the db is for anything real important, such as maintaining compliance to an ISO standard, financial data or data upon which production decisions might be made. Kicking somebody out of their own front end in the middle of data entry may cause data integrity issues. While the db may balk when a call is made to close it and a record is missing data in required fields, it will still close when the Quit method is invoked. At least, that's been my experience. This could leave you with orphaned records and perhaps introduce corruption, in which case it doesn't really matter how important the data is if you corrupt the db. All the methods I've ever read about involve giving a user time to complete a task, which doesn't seem to be what you're after.
Consider trying to open your updating db exclusively, and if you can, then run the update. No one will be able to get in while you have it open.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Hmm, I'm curious, is the database split? Because then you could notify the Users to shut down when they are finished and upon opening it should run your code to update the Frontend. I would not EVER throw them out, this will have serious consequences as previously mentioned. And the does not count the angry Users!