DCrake
Remembered
- Local time
- Today, 07:48
- Joined
- Jun 8, 2005
- Messages
- 8,632
Here is a simple demo that can log out remote users.
I have included some points on the opening form, however the one thing to point out is that the apllication needs to have an application icon.
In the demo the routine is looking for a text file in the current project path however in real time this file needs to be in the same folder on the shared location wher the back end resides. This way you only need to publish the Lock.txt file to one location that all logged in users can see.
Hope you like it and any comments you may have will be welcome.
I have included an icon in the zip file and to get it to work straightway save the accdb to C:\AutoLogOut
All you need to do is import the module and class into your front end and the sample form. Then copy the form module into your main menu form.
As an added feature if you use the following code in the OnLoad Event of your splash screen this will prevent the user from reopeing the database
Then when you have finished your work on the database you simply delete the Lock.Txt file or rename it to Free.txt.
I have included some points on the opening form, however the one thing to point out is that the apllication needs to have an application icon.
In the demo the routine is looking for a text file in the current project path however in real time this file needs to be in the same folder on the shared location wher the back end resides. This way you only need to publish the Lock.txt file to one location that all logged in users can see.
Hope you like it and any comments you may have will be welcome.
I have included an icon in the zip file and to get it to work straightway save the accdb to C:\AutoLogOut
All you need to do is import the module and class into your front end and the sample form. Then copy the form module into your main menu form.
As an added feature if you use the following code in the OnLoad Event of your splash screen this will prevent the user from reopeing the database
Code:
If Dir("YourBackEndPathHere\Lock.Txt") <> "" Then
MsgBox "The database is currently unavailable for routine maintenance",vbInformation+vbOkOnly,"Application under development"
DoCmd.Quit
End If
Then when you have finished your work on the database you simply delete the Lock.Txt file or rename it to Free.txt.
Attachments
Last edited: