Admin panel

mjdemaris

Working on it...
Local time
Today, 05:08
Joined
Jul 9, 2015
Messages
426
Hello all!
I just found a post from DCrake, in which he mentioned that an admin panel is a large topic on this forum. Has anyone successfully built an admin panel/form that you can use to monitor who is logged in, maybe what forms they are using and with the option of kicking a user if need be, say for maintenance?

And maybe sending them a message via message box before kicking?

I noticed Khalid_Afridi has one, he did not say if he built it or not.

http://www.access-programmers.co.uk/forums/showthread.php?p=948955

Thanks!
 
I have created user monitoring systems in databases before. All you are asking is achievable. When you stop and think through the requirements, it is pretty straightforward.

Tables:
Users - for logging in
In Use table - for logging which objects (forms/reports/queries) are open by which user
Kick/Maintenance table - for indicating shutdown requirements (can be user specific or whole)

Forms:
Maintenance - to see who is doing what and trigger kicks/maintenance
Message form - to provide user messages

Code:
You need to add code at the opening of every object to APPEND the object name and user name to the In Use table AND code at close of an object to DELETE that object name and user name from the In Use table.

Add an On_Timer event to a master (always open) form to check the Kick/Maintenance table. This would display the message form for the relevant user(s) and take any appropriate action.
 
Could I use the Users table I already have, and just put a LoggedOn field, and make it a yes/no?

This table also stores environ names - so it might be the perfect place, since the application gets their environ, and from there allow access to certain forms/controls.
 
I am sure your current Users table would be fine. The actual recording of logged in or not is up to you.

The Maintenance table is where you control what you want to happen with the database. So from an Admin panel (Maintenance form) you can see who has which objects open. You may want to shutdown the whole database or just 1 user, or a particular object. You would record the object name(s), types, user name(s) and actions in the Maintenance table, along with the message you want displayed. When the On_Timer event triggers, your code checks Maintenance for that user and displays the relevant message(s) and then takes the appropriate action.

EG1
UserA has FormZ open, but their rights have been changed, so it needs closing.
Maintenance Table:
User = UserA
Object = FormZ
Type = Form
Message = Access permissions changed. You can not use FormZ
Action = Close object

EG2
UserF has Report5 open, but that report has been identified as having a bug, so database needs closing for update.
Maintenance Table:
User = UserF
Object = Report5
Type = Report
Message = Report5 has been identified as requiring a bug fix. The database will now be closed for this update.
Action = Close object

These are very broad examples but should give you the feel for it.
 

Users who are viewing this thread

Back
Top Bottom