13-09-13, 03:10 PM
وعليكم السلام
تفضل أخوي هذا الكود ضعه في Button
تفضل أخوي هذا الكود ضعه في Button

كود :
SaveFileDialog1.Filter = "Access 2007 (*.accdb)|*.accdb|All files (*.*)|*.*"
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.Cancel Then
'في الديالوج Cancel إلغاء عملية الحفظ عند إختيار
Exit Sub
Else
Try
Dim SavePath As String = SaveFileDialog1.FileName
FileCopy(Application.StartupPath & "\bakdb.accdb", SavePath)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
MsgBox("Backup has been taken Successfully")
End Ifبالتوفيق
