Todd:
Check this out (posted by an access user with the same problem):
* Create a form, add a timer event to the form.
* Autoexec macro (on open DB macro).
Add the following commands:
- Open the timer form.
- Hide the Timer form (So, users
Cannot see interfere with it).
* On the timer form, Auto set the "On timer" event to activate when the form loads.
Private Sub Form_Load()
Form.TimerInterval = 1000 ‘ 1000 being every 1 second, the timer will run.
Me.Visible = False
End Sub
Add 2 fields to the Form -
1. - Being the = system time
2. Being the Targettime.... (Which is the time you want to kick everybody out)
Add your own variation of code, here’s an example:
(This code will run every 1000, or every 1 second…. Until it finds a match)
Public Sub Form_Timer()
Dim FrmDate As Date
Dim Sysdate As Date
' Set variable values
FrmDate = Me.txttime.Value
Sysdate = Format(Now, "HH:MM:SS")
' When FrmDate = the system clock, run required program.
If FrmDate = Sysdate Then
Docmd.quit
End If
End Sub
You can change the Target time to any time you wish…..
Just make sure you keep the form open at all times.
When the system date = the Target date, because everybody has this form open in the background (Hidden), Everybody will be kicked out of the database.
You could use the same principle for sending a 10 minute warning ….