Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

746 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

9 Experts available now in Live!

Get 1:1 Help Now