Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
If Dir(filepath) = "" Then MkDir (filepath)
if dir(filepath-filename)="" then作者: andymark 时间: 2007-10-26 12:35
Public Function BackEndData() As Boolean
Dim StrDesPath As String
Dim StrSourcePath As String
Dim StrDesName As String
Dim StrSourceName As String
StrSourceName = "Data.mdb"
StrSourcePath = CurrentProject.Path & "\Data\" & StrSourceName
StrDesName = Format(Now, "yymmdd") & "data.mdb"
StrDesPath = CurrentProject.Path & "\Bak\" & StrDesName
If Dir(StrDesPath) <> "" Then
Kill StrDesPath
End If
FileCopy StrSourcePath, StrDesPath
End Function作者: zyz218 时间: 2007-10-26 18:26
错误提示:“权限不允许!”