Solved

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

Posted on 2014-01-28
4
699 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 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

911 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

26 Experts available now in Live!

Get 1:1 Help Now