Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-01-28
4
Medium Priority
?
797 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 1000 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 58

Accepted Solution

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

876 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