code à mettre dans un formulaire dans : "Sur fermeture" Dim str As String Dim buf As String Dim MD_Date As Variant Dim fs As Object Dim source As String Const conPATH_FILE_ACCESS_ERROR = 75 On Error GoTo Backup_Backup 'buf = Back Up Folder 'buf is created if it does not exist 'CurrentProject.Path = the path that the FE is located buf = "E:\2017\Applications\Med KOUNTA\bkp\" MkDir buf Resume Backup_Backup Backup_Backup: 'Use dd-mm-yyyy hh-mm-ss as folder name. Change as needed. MD_Date = Format(Date, "dd-mm-yyyy ") & Format(Time, "hh-mm-ss") str = buf & MD_Date 'Source = where the data is stored source = "E:\2017\Applications\Med KOUNTA\db\" MkDir str Set fs = CreateObject("Scripting.FileSystemObject") 'Change the file extension as needed fs.CopyFile source & "*.accdb", str Set fs = Nothing MsgBox "SAUVEGARDER CE " & vbCrLf & MD_Date & vbCrLf & "AVEC SUCCES", _ vbInformation, "SAUVEGARDE REUSSIE" Exit_Backup: Exit Sub Err_Backup: If Err.Number = conPATH_FILE_ACCESS_ERROR Then MsgBox "The following Path, " & str & ", already exists or there was an Error " & _ "accessing it!", vbExclamation, "Path/File Access Error" Else MsgBox Err.Description, vbExclamation, "Error Creating " & str End If Resume Exit_Backup