Backup the MDB but verifying that the time when closing

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.-
 
B

banem2

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
 
G

Guest

"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.-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top