Solved

Can I send a msg to users of an Access database via vba?

Posted on 2014-01-28
4
710 Views
Last Modified: 2014-01-28
Hello All

I have about 10 users on an Access database.  They all log into a main form and then use the program.  Many times the users forget to log off at the end of the day and I either have to knock them off (by going on the Host server and closing the shared files) or I have to try and get in touch with them to log off properly.

Is there a way using VBA to send them a msg to log off or is there a way to have the application quit for everyone? I have a docmd quit in the timer of the main form that quits everyone at 11:30pm but I was curious if there is a way to send the quit.

Thanks
0
Comment
Question by:alevin16
4 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 250 total points
ID: 39815307
you can create a form that will detect if the application is idle and quit the application..

see this for more detailed explanation
How to detect User Idle Time or Inactivity
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 39815309
Comments:

1. This:

<<Many times the users forget to log off at the end of the day and I either have to knock them off (by going on the Host server and closing the shared files) >>

 Is a really bad idea and can lead to database corruption (assuming a JET MDB/ACCDB backend here) if they happened to be doing something and not idle.

2. You can use the passive shutdown feature built into JET.  This however is passive, so while it locks any further users from connecting, it won't boot the remaining users.

3. You can build something into the app along the lines of this:

ACC: How to Detect User Idle Time or Inactivity
http://support.microsoft.com/kb/128814

4. and /or you can build something into the app that messages them by opening a hidden form at startup, using the forms timer, and checking a "flag" of some type every so often.  If the flag get's set, you popup a message.

5. You can use resource locking:

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

 This can be used in all sorts of ways; for #4 above, keeping track of who is in the application, locking out the entire app, a module (say AR), or a specific function, forcing them out of the app if the idle time is reached or a "get out flag" is set.

HTH,
Jim.
0
 

Author Comment

by:alevin16
ID: 39815391
Thanks to both of you.  I am going to give this a shot.
0
 
LVL 75
ID: 39815719
Here are three more solutions, all of which I use:

Force Shut Down (free)
http://www.peterssoftware.com/fsd.htm
I built an entire Forced Shutdown module from this app. Takes everything into account.

Or

Inactive Shut Down Control (free)
http://www.peterssoftware.com/isd.htm

Or
Total Access Admin (not free, but excellent)
http://fmsinc.com/MicrosoftAccess/monitor.asp
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

786 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