Late4Supper
Registered User.
- Local time
- Yesterday, 23:55
- Joined
- Sep 16, 2002
- Messages
- 32
This is a weird one. I have an app that runs fine on a NT machine and ACCESS97, runs fine on a 2000 machine and converted to ACCESS XP, but generates a Run Time error (5) on a 2000 machine running ACCESS 97. The error bounces back on
.filename = "*.pdf" .
Here's the full code
Function CompareFilesForCopy2()
Dim fs
Dim i
Set fs = Application.FileSearch
With fs
.LookIn "\\Cornishrex04Apps\CalligoDMS\output\Underwriting\complete\"
.FileName = "*.pdf" 'run time error(5) gets generated here If .Execute > 0 Then
' MsgBox "There were " & .FoundFiles.Count & " file(s) found."
For i = 1 To .FoundFiles.Count
If Not FileDateOlderThan180days(.FoundFiles(i)) Then
copypdfFiles2 .FoundFiles(i)
End If
Next i
Else
MsgBox "There were no files found in underwriting complete."
End If
End With
End Function
.filename = "*.pdf" .
Here's the full code
Function CompareFilesForCopy2()
Dim fs
Dim i
Set fs = Application.FileSearch
With fs
.LookIn "\\Cornishrex04Apps\CalligoDMS\output\Underwriting\complete\"
.FileName = "*.pdf" 'run time error(5) gets generated here If .Execute > 0 Then
' MsgBox "There were " & .FoundFiles.Count & " file(s) found."
For i = 1 To .FoundFiles.Count
If Not FileDateOlderThan180days(.FoundFiles(i)) Then
copypdfFiles2 .FoundFiles(i)
End If
Next i
Else
MsgBox "There were no files found in underwriting complete."
End If
End With
End Function