tnguyen315
MIS
I have an access database and it's been working for years, suddenly my code stop working on movefolder ....I have full control on admin...
I tried to search but nothing works, please help...
My code:
Private Sub cmdClose_Click()
Dim dest As String
Dim NewDest As String
Dim NewDest1 As String
Dim src As String
Dim FSO As New Scripting.FileSystemObject
dest = "\\Mosquito\Adulticide-Test\Docs\ImportsOps"
NewDest = \\Mosquito\Adulticide-Test\Docs\ArchivedOps\"
DoCmd.Hourglass True
If FSO.FolderExists(dest) Then
If FSO.FolderExists(NewDest & Format(Date, "mm-dd-yyyy")) Then
FSO.DeleteFolder (NewDest & Format(Date, "mm-dd-yyyy")) ''///working on this...
Me.Refresh
NewDest1 = FSO.CreateFolder(NewDest & Format(Date, "mm-dd-yyyy"))
Else
NewDest1 = FSO.CreateFolder(NewDest & Format(Date, "mm-dd-yyyy"))
End If
NewDest1 = NewDest1 & "\"
Me.Refresh
FSO.CopyFolder (dest), (NewDest1)
me.Refresh
fso.DeleteFolder dest ''\\Stop working right here...Run time error 70, Permission denied
fso.CreateFolder (dest)
Else
FSO.CreateFolder (dest)
End If
DoCmd.Hourglass False
DoCmd.Close acForm, Me.Name
End Sub
Please help , Im very appreciated.
Thank you very much
TWEE
I tried to search but nothing works, please help...
My code:
Private Sub cmdClose_Click()
Dim dest As String
Dim NewDest As String
Dim NewDest1 As String
Dim src As String
Dim FSO As New Scripting.FileSystemObject
dest = "\\Mosquito\Adulticide-Test\Docs\ImportsOps"
NewDest = \\Mosquito\Adulticide-Test\Docs\ArchivedOps\"
DoCmd.Hourglass True
If FSO.FolderExists(dest) Then
If FSO.FolderExists(NewDest & Format(Date, "mm-dd-yyyy")) Then
FSO.DeleteFolder (NewDest & Format(Date, "mm-dd-yyyy")) ''///working on this...
Me.Refresh
NewDest1 = FSO.CreateFolder(NewDest & Format(Date, "mm-dd-yyyy"))
Else
NewDest1 = FSO.CreateFolder(NewDest & Format(Date, "mm-dd-yyyy"))
End If
NewDest1 = NewDest1 & "\"
Me.Refresh
FSO.CopyFolder (dest), (NewDest1)
me.Refresh
fso.DeleteFolder dest ''\\Stop working right here...Run time error 70, Permission denied
fso.CreateFolder (dest)
Else
FSO.CreateFolder (dest)
End If
DoCmd.Hourglass False
DoCmd.Close acForm, Me.Name
End Sub
Please help , Im very appreciated.
Thank you very much
TWEE