Solved

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

Posted on 2013-10-31
4
462 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
Comment Utility
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
Comment Utility
Perfect, thanks for the help, Jim.

Dave
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 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

17 Experts available now in Live!

Get 1:1 Help Now