|
The Administration Form - Workbench Help File |
Top Previous Next |
|
{ Shutdown databases or send messages to users} The Administration button allows you to send messages to users of a database and to shutdown the database.
Figure 1 - The Administer button on the Main Form Once you click on the Administration button (Figure 1), you are presented with a form (Figure 2) that allows you to either send a message to users or to shutdown a database. You will now see how to do that. <<< Click to enlarge Figure 2 - The administration form just after a message was posted to users Sending Messages To Users To send a message to users of a database, all you need to do after selecting the correct database is
Figure 3 - Using the Workbench to send users a message
Figure 4 - Information about the workbench message file that was created
NOTE: It is best to leave the Administration form open in the background so that you can delete the message when you no longer want it to appear. If you now look at the bottom of the Administration form, you will find that a highlighter shows that the message file is open.
Figure 5 - Highlighter on the Admin screen to show that a message file is open. Testing For And Displaying a Workbench Message File To make the user messages form pop up on every users computer, you need to add a form to the Access database. We will call this form the Database Messages form and you need to ensure that the form remains open (but hidden) whenever the database is open (Autoexec macro). Included in that form is some code (VBA) that is designed to look every few minutes or so for the existence of the Workbench message file. When it does find the file, it reads the message and displays it on the Database Messages form which it will now Pop Up in front of all the other Access windows. Once the user reads the message (as shown in Figure 6), they will probably click the OK button to hide the form again. If you leave the VBA that we provide AS IS, the form will pop up again next time the form timer event is run again. We recommend an interval of 5 minutes between checking for the existence of the Workbench message file.
Figure 6 - And example of what a user message window will look like in your database Getting The Code To Display A Workbench Message File To make the messaging happen in your Access database, you need add the following VBA to the Timer event of your Database Messages form
call CheckForMessage call CheckForShutdown These two small subroutines will undertake these checks for you and display the message from the files. To find the VBA code for these subroutines, you can click on the GetCode button at the bottom of the Admin screen (see Figures 1 and 7). You will then be given detailed instructions on how to setup your form.
Figure 7 - The button that will copy your message code to the clipboard The easier way to achieve the same result is to purchase the Access Workbench and copy the sample Database messages form into your own database. You will receive this form and a number of other useful administration forms in the registration email that you receive from us. Shutting Down The Database To shutdown a database, all you need to do after selecting the correct database is
Figure 8 - Using the Workbench to Shutdown a database What Happens When The Shutdown Process Starts The behavior and setup of the Workbench shutdown works in almost the same way as the messaging system in that it looks for the existence of a Workbench file (file type of .awbsdf) before the appropriate action is taken. When the file is found, the database is closed down and the shutdown message is presented to the user in a Word document (Figure 9) so that they understand why the database is no longer open. The method used to shutdown the database closes all the open forms and reports and saves the information (if it can).
Figure 9 - The database shutdown message is displayed in a Word file De-Activating The Shutdown File Once you post a file, all the users will generally have their database closed down within a few minutes. As this technique relies on the existence of the file to monitor for shutdowns, it is important that you return as soon as you have finished your vital administration tasks and remove the shutdown file using the Remove Shutdown File button (shown in Figure 8). In the meantime, a highlighter (Figure 10) shows you that the shutdown file is still in play.
Figure 10 - Highlighter shows that a shutdown file still is affecting your users Further Reading and Code
If you have a setup where users are using databases on local drives or have multiple front-ends connecting to the same back-end, you will need to read this page.
Other Access Workbench Topics Home Page | Install | UNREGISTERED EVALUATION VERSION | MRU Select | Stop New Users | FAQ Page | Orders
This help file was created with an unregistered evaluation copy of Help & Manual. © EC Software. All rights reserved. This message will not appear if you compile this help file with the registered version of Help & Manual. |