Time countdown

Ade F

Avid Listener
Local time
Today, 19:26
Joined
Jun 12, 2003
Messages
97
I wondered if anyone would know of a simple way to acheive this scenario. I have a text box with the =Time() function refreshing using the timer event. This just shows a clock.

At ten oclock everybodies front ends automatically disconnect from the back end allowing backup to an off site location. What I would like is to have another text box displaying how long is left until the database shuts down e.g how many hours and minutes until 10.00pm. Some workers work late and it would be nice to let them know when the database will shut down for backup.

Any ideas?

Cheers

Ade
 
I would like to get over this...

I would prefer to disconnect as my backup software cannot access the file when it is open. I don't wish to introduce anymore code to export data either, cheers for the suggestion though ;) .

Any ideas for the above question?

Oldsoftboss said:
Not sure if this will help or not, but in a recent thread it was discuss that a Db did not have to be closed to backup. Hope this thread will help.

http://www.access-programmers.co.uk/forums/showthread.php?t=57863

Dave
 
Last edited:
Code:
Private Sub Form_Load()
Dim strTime1 As Date
Dim strTime2 As Date
Dim strTime3 As Date

strTime1 = Time()
strTime2 = "10:00:00 PM"

strTime3 = strTime2 - strTime1
Me.txtTime2 = Format(CDate(strTime3), "hh:nn:ss")

End Sub

You can go from here, set it up on a timer so it updates, you could also have a Message box pop-up on times when it is equal to "strTime".
________
Ford Flexible Fuel Vehicle History
 
Last edited:
Like charm

Works like a charm. I'm just about to post another on the forms list so please have a look.

cheers

Ade



a.sinatra said:
Code:
Private Sub Form_Load()
Dim strTime1 As Date
Dim strTime2 As Date
Dim strTime3 As Date

strTime1 = Time()
strTime2 = "10:00:00 PM"

strTime3 = strTime2 - strTime1
Me.txtTime2 = Format(CDate(strTime3), "hh:nn:ss")

End Sub

You can go from here, set it up on a timer so it updates, you could also have a Message box pop-up on times when it is equal to "strTime".
 

Users who are viewing this thread

Back
Top Bottom