Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backup a database

Status
Not open for further replies.

Brogrim

Technical User
Jul 28, 2000
184
IE
I have a stand alone PC with an Access database file. I want the file to be backed up to a CD every 30 Mins.

Do I need additional software.
 
The problem with what you want to do is that to back up an Access file correctly, everyone needs to be out of the file. You could look at synctoy (Microsoft freeware) to help automate copying the file but you will still have the locking problem.

You could append all the records to a linked database and then copy it to the CD but would likely become a performance problem. Every 30 minutes seems frequent. Why so often?
 
How bout using the timer event on a form that stays open all the time.
Make this form invisible, call it to open with your startup form.

Docmd.openform "NameOfForm", , , , , acHidden

Then, on the On Timer event:
Private Sub Form_Timer()

If Not ysnCopyFile(CurrentDb.Name, "E:\Backup.mdb") Then
MsgBox "Error copying your database"
End If
'E being your CD Drive

End Sub

Then set your Timer Interval to whatever time you want it to backup. (60000 for a minute or whatever)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top