I Access 97 this worked fine- I found the requisite 160,000 or so files.
We just converted to Access 2003 and am stuck at some 65,530 records which seems to be the upper limitation for this. When I look at the documentation it says that the foundfiles count is a long. Does anyone have any Idea why I'm stuck at this limitation of 65,530 files found?
I was doing a filesearch that looked like the following:
Sub tifFilesearch()
Dim myarray()
Dim fs As Object
Dim i As Integer
' Declare filesearch object.
Set fs = Application.FileSearch
' Set folder to search.
fs.LookIn = "s:\recovery\odom"
' Set file name to search for.
fs.FileName = "*.tif"
fs.SearchSubFolders = True
' Execute the file search, and check to see if the file(s) are
' present.
If fs.Execute > 0 Then
' Redimension the array to the number of files found.
ReDim myarray(fs.FoundFiles.Count)
Debug.Print fs.FoundFiles.Count
' Loop through all found file names and fill the array.
For i = 1 To fs.FoundFiles.Count
DoCmd.RunSQL "insert into TotalOdomInfo (image) select " & Chr(34) & (fs.FoundFiles(i)) & Chr(34) & " as expr1;"
Next i
Else
' Display message if no files were found.
MsgBox "No files were found"
End If
End Sub
Ulf Saeger - 28 Jun 2004 20:02 GMT
> Dim i As Integer
should be
Dim i as Long
barelizard@hotmail.com - 29 Jun 2004 22:35 GMT
Unfortunately, I've changed it to botha a long and then a double with the same results.
> > Dim i As Integer
> should be
> Dim i as Long
Jim Webb - 31 Jan 2005 14:58 GMT
Hi:
I've run into the same problem. Did you ever get a good answer to this one
(or a workaround)?
Thanks!
Jim Webb
JCWebb[at]KSLaw[period]com