Solved

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

Posted on 2014-01-28
4
752 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 58

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

729 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