Procedure to back-up database (for MS Access)
Procedure to back-up database (for MS Access)
API Declarations
Dim CommondialogControl As Control
Rate Procedure to back-up database (for MS Access)
(1(1 Vote))
'CommondialogControl = CommondialogControl
'Ask the filename of Back-Up
CommondialogControl.Filter = "Back-Up Files (*.mdb)|*.mdb"
'Set Default DIR
CommondialogControl.InitDir = "C:\"
'Display the SHOWSAVE window
CommondialogControl.ShowSave
On Error GoTo Opps
'If there is an entry
If CommondialogControl.FileName <> "" Then
'if already exist then delete the file
If Dir(CommondialogControl.FileName) <> "" Then Kill CommondialogControl.FileName
' 'repair database
'' DBEngine.RepairDatabase "C:\Documents and Settings\allen\Desktop\mitch-barcode\monitoringdbCon.mdb"
FileCopy StrSource, CommondialogControl.FileName
'Text1.Text = CommondialogControl.FileName
'Prompt to User that Back_Up is Completed
MsgBox "Back-Up Complete!", vbInformation, "BACK-UP SUCCESSFUL"
End If
Exit Sub
Opps:
MsgBox Err.Description, vbExclamation, "Employee Status System"
End Sub
Procedure to back-up database (for MS Access) Comments
No comments yet — be the first to post one!
Post a Comment