Hi, I need to backup my database.
I'm trying to copy tables from original database that is on a server, by pressing a button,
to another database. I use this code, but it gives an error a error:
Is there another way to do back up on my database?
I'm trying to copy tables from original database that is on a server, by pressing a button,
to another database. I use this code, but it gives an error a error:
Code:
Private Sub b1_Click()
Dim FileNameOrig As String
Dim FileNameCopy As String
Dim d, d1, d2, d3 As String
d1 = Format(Date, "dd/mm/yyyy")
d2 = Format(Time, "hh/mm")
d = d1 & "_" & d2
FileNameOrig = "D:\DZK_T01\System\BD.accdb"
FileNameCopy = "D:\DZK_T01\ArchivBD\ArhivBD_InfSisDZK1 _" & d & ".accdb"
FileCopy FileNameOrig, FileNameCopy
DoCmd.CopyObject FileNameCopy, "\\192.168.200.222\dzk\DZK\InfSisDZK1_Mo_T01.accdb\01 Objet", acTable, "01 Objet"
End Sub