hugox03 > 04-02-14, 10:56 PM
morosumo > 05-02-14, 01:25 AM
hugox03 > 05-02-14, 02:50 AM
morosumo > 05-02-14, 11:34 PM
tvn_hut > 18-02-18, 12:41 PM
(05-02-14, 01:25 AM)morosumo Đã viết: Bạn tạo 1 module
Function BackupDUPHONG() As Boolean
Dim Source As String
Dim Target As String
Dim retval As Integer
Source = CurrentDb.Name
Target = "E:\LUUDUPHONG\luuthang"
Target = Target & Format(Date, "dd-mm") & " "
Target = Target & Format(Time, "hh-mm") & ".accdb"
' create the backup
retval = 0
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
retval = objFSO.CopyFile(Source, Target, True)
Set objFSO = Nothing
MsgBox "Sao luöu döõ lieäu thaønh coâng", , "Thoâng baùo"
End Function
--------
Target = "E:\LUUDUPHONG\luuthang"
bạn điều chỉnh lại cho phù hợp nha.