代码如下:
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" _
(ByVal lpExistingFileName As String, ByVal lpNewFileName As String, _
ByVal bFailIfExists As Long) As Long
Private Sub 命令0_Click()
CopyFile CurrentProject.Path & "\CopyFile.mdb", _
CurrentProject.Path & "\" & Date & "_Bak.mdb", 0
End Sub