Backup the MDB but verifying that the time when closing

  • Thread starter Thread starter UTOPIAN
  • Start date Start date
U

UTOPIAN

Hi all!!

How do I make that:

When closing the mdb do the following:

Backup the mdb, but verifying that the time is >= at 13: 00 hr.???


Thanks!!!

Utopian.-
 
Hi all!!

How do I make that:

When closing the mdb do the following:

Backup the mdb, but verifying that the time is >= at 13: 00 hr.???

Thanks!!!

Utopian.-

Simple solution is to create one empty form which you will open as
hidden when DB loads. When this form closes (that can happen only when
the DB is closed) you can run code on OnClose event:

If Time() >= "13:00:00" Then
FileCopy "YourDB.mdb", "BackOfYourDB.mdb"
End If

Depending on the code you already have to backup your database, please
change second line of the code above.

Note that time "resets" at midnight so each time between 13:00 and
24:00 will run the FileCopy line.

Regards,
Branislav Mihaljev, Microsoft Access MVP
 
"UTOPIAN" <[email protected]> a écrit dans le message de groupe de discussion : (e-mail address removed)...
Hi all!!

How do I make that:

When closing the mdb do the following:

Backup the mdb, but verifying that the time is >= at 13: 00 hr.???


Thanks!!!

Utopian.-
 
Back
Top