Solved

Access 2007 Can I close Access on another user's computer in VBA?

Posted on 2013-10-31
4
475 Views
Last Modified: 2013-10-31
I need to make updates from time to time in Access.   If another user has the company db open, I can't export modules to it.  Can I close the db from my workstation?  If so, how?
0
Comment
Question by:David_W_R
  • 2
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39613827
While you can, it's not a great idea.

A better approach is to provide a shutdown feature in the app itself, either passive or forced.

Open a hidden form at startup, and set a timer for say 60 seconds.   Each time it fires, check a flag (a field in a table for example) and if that flag is found, message the user.  You can then either let them finish up (passive) or quit the app (forced).

Also check that flag at startup and if found, don't start the app, just quit.

You can do the flag with something like this:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_5328-Resource-locking-in-your-applications.html

Jim.
0
 

Author Closing Comment

by:David_W_R
ID: 39614048
Perfect, thanks for the help, Jim.

Dave
0
 
LVL 57
ID: 39614063
Dave,

 I should have added another piece that you might want to implement as part of this:

How to detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/kb/210297

 This show you how to kick out users based on inactivity.  This in conjuction with a lock out flag gives you a good all a round solution.

 I also should have mentioned that the reason you don't want to force a user out of Access externally is that it can cause database corruption.

Jim.
0
 

Author Comment

by:David_W_R
ID: 39614110
The very issues I was addressing in my mind while contemplating the next move.   Thanks very much for the thoughtful follow-up.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now