I have an Access 97 database with code that executes fine under Win 9x. But under Win 2000 I receive the following error:
"Run-time error '5':
Invalid procedure call or argument"
This error occurs in the below code... I only included to the point that I receive the error. Any thoughts would be greatly appreciated. Note that strPath is a valid path and strType = "BIL". I'm guessing there is some new security "feature" in Win 2000 that I have not found the information on. (As if the Text ISAM update wasn't a big enough pain <MS article Q239105>)
Function importfiles(strPath As String, strType As String)
Dim fs As Object
Dim i As Integer
Dim DB As Database, sqlstr As String
Dim strDest As String, strOrig As String
Set DB = CurrentDb
Set fs = Application.FileSearch
DoCmd.Hourglass True
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
With fs
.newsearch
.LookIn = strPath
.SearchSubFolders = False
.FileName = "*." & strType
"Run-time error '5':
Invalid procedure call or argument"
This error occurs in the below code... I only included to the point that I receive the error. Any thoughts would be greatly appreciated. Note that strPath is a valid path and strType = "BIL". I'm guessing there is some new security "feature" in Win 2000 that I have not found the information on. (As if the Text ISAM update wasn't a big enough pain <MS article Q239105>)
Function importfiles(strPath As String, strType As String)
Dim fs As Object
Dim i As Integer
Dim DB As Database, sqlstr As String
Dim strDest As String, strOrig As String
Set DB = CurrentDb
Set fs = Application.FileSearch
DoCmd.Hourglass True
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
With fs
.newsearch
.LookIn = strPath
.SearchSubFolders = False
.FileName = "*." & strType