Shutdown DB at specified time

Ade F

Avid Listener
Local time
Today, 17:30
Joined
Jun 12, 2003
Messages
97
Just wondered if anyone knows of way of closing the a DB at a specified system time?

This would be very handy for me if every user has unlinked themselves from the back end (situated on a shared network drive) as I believe that should a user still be logged in and backup try to commence it cannot as the BE file is still open and locked.

Cheers people :D

Ade
 
You can add the following to a forms (Switchboard or a hidden form) On Timer event:

Code:
Private Sub Form_Timer()

Dim offTime
offTime = Format(TIME(), "hh:mm")
If offTime = "07:30" Then
DoCmd.Quit
Else
End If

End Sub

HTH
 
I think there have been examples posted, try do a search for logout users.
I suppose you could put the following code on the timer event of a form and set the timer to 1000

Code:
If time = "21:30:00" Then '21:30:00 would be the time you want to shut down
docmd.quit
End if

This should shut the db down, put probably would use a lot of system resources. Just an idea.

Andy
 
Cheers mate that is a solution.. great

Cheers mate that is a solution.. great


jfgambit said:
You can add the following to a forms (Switchboard or a hidden form) On Timer event:

Code:
Private Sub Form_Timer()

Dim offTime
offTime = Format(TIME(), "hh:mm")
If offTime = "07:30" Then
DoCmd.Quit
Else
End If

End Sub

HTH
 
time to shut down

Another question for the experts

I would like to display a text box telling the user how long they have until the DB shuts down say 9.30pm, hours min secs.

Any ideas?



spacepro said:
I think there have been examples posted, try do a search for logout users.
I suppose you could put the following code on the timer event of a form and set the timer to 1000

Code:
If time = "21:30:00" Then '21:30:00 would be the time you want to shut down
docmd.quit
End if

This should shut the db down, put probably would use a lot of system resources. Just an idea.

Andy
 

Users who are viewing this thread

Back
Top Bottom