J
Justin
I have the following code that works fine with Acess 2002 SP2. I run the
same code useing Acess 2007 SP2 I get Run-time error 2455 "You entered an
expression that hase an invalid reference to the property FileSearch". Both
system set-ups have the same set of references.
With Application.FileSearch
.NewSearch
.LookIn = sPath
.FileName = sFile
If .Execute() > 0 Then
If MsgBox("Delete existing file " & sPath & sFile & "?",
vbYesNo, "Dupilcate File Name") = vbYes Then
Kill (sPath & sFile)
Else
MsgBox "Delete or rename file " & sPath & sFile & ".",
vbOKOnly, "Dupilcate File Name"
Exit Sub
End If
End If
End With
same code useing Acess 2007 SP2 I get Run-time error 2455 "You entered an
expression that hase an invalid reference to the property FileSearch". Both
system set-ups have the same set of references.
With Application.FileSearch
.NewSearch
.LookIn = sPath
.FileName = sFile
If .Execute() > 0 Then
If MsgBox("Delete existing file " & sPath & sFile & "?",
vbYesNo, "Dupilcate File Name") = vbYes Then
Kill (sPath & sFile)
Else
MsgBox "Delete or rename file " & sPath & sFile & ".",
vbOKOnly, "Dupilcate File Name"
Exit Sub
End If
End If
End With