does somebody know's how to bypass permission denied?
i tried to open the db close it played with it but still no luck i get permission denied
End Sub
i tried to open the db close it played with it but still no luck i get permission denied
Code:
Private Sub doBackup()
cd1.InitDir = App.Path
cd1.FileName = cd1.InitDir & "\HairDesign" & Format(Now, "dddd-mm-yyyy") & ".mdb"
cd1.ShowSave
Dim targetFile As String
targetFile = cd1.FileName
If Dir(targetFile) = "" Then
FileCopy App.Path & "\HairDesign.mdb", targetFile
ElseIf MsgBox("backup exists overwrite it?", vbYesNo) = vbYes Then
CN.Close
FileCopy App.Path & "\HairDesign.mdb", targetFile
MsgBox "BackUp Succeeded", vbInformation
CN.Open
frmBackupDba.Hide
End If