Coloque dois CommandButton em um form e copie o código abaixo:
Private Sub Command1_Click()
Me.MousePointer = vbHourglass
BDBackup "SeuBanco.mdb"
Me.MousePointer = vbDefault
End Sub
Private Function BDBackup(vArquivo As String)
Dim vArqOrigem, vArqDestino
vArqOrigem = vArquivo
'12/45/7890
If Dir(Mid(Date, 7, 4) & Mid(Date, 4, 2) & Mid(Date, 1, 2)) <> "" Then
Kill Mid(Date, 7, 4) & Mid(Date, 4, 2) & Mid(Date, 1, 2)
End If
vArqDestino = Mid(Date, 7, 4) & Mid(Date, 4, 2) & Mid(Date, 1, 2) & ".bkp"
FileCopy App.Path & "" & vArqOrigem, App.Path & "" & vArqDestino
End Function
Private Function BDRestore(vArqOrigem As String, vArqDestino As String)
If Dir(vArqDestino) <> "" Then
Kill App.Path & "" & vArqDestino
End If
FileCopy App.Path & "" & vArqOrigem, App.Path & "" & vArqDestino
End Function
Private Sub Command2_Click()
Me.MousePointer = vbHourglass
BDRestore "20041214.bkp", "SeuBanco.mdb"
Me.MousePointer = vbDefault
End Sub
T+
Rinaldo