by Christopher (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 3rd November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Backup and Restore
API Declarations
Dim source As String, desti As String
On Error GoTo err
Dim source As String, desti As String
source = App.Path & "\Biblio.mdb"
With CommonDialog1
.DialogTitle = "Backup"
.Filter = "mdbfles (*.mdb)|*.mdb"
.ShowSave
desti = .FileName
backfile.CopyFile source, desti, True
MsgBox "Databas has been backup", vbInformation
End With
Exit Sub
err:
Beep
End Sub
Private Sub Command2_Click()
On Error GoTo err
desti = App.Path & "\Biblio.mdb"
With CommonDialog1
.DialogTitle = "Restore"
.Filter = "Access Files(*.mdb)|*.mdb"
.ShowOpen
source = .FileName
End With
backfile.CopyFile source, desti, True
Exit Sub
err:
Beep
End Sub