Copy database backend OnClose

R

Ripper

Is there a way to copy the backend of my database to another location when it
closes? I have a form that is open for 10 hours and then closes. Once that
form closes, it forces that database to close, unless someone is still using
it. I want the database to back itself up by making a copy once that occurs.
How can I do that?
 
D

Douglas J. Steele

As long as no connections are open to the back-end (checking whether the LDB
file exists will check that), you can simply use the VBA FileCopy statement
to make a copy.
 
Top