G
GordonP
I'm creating an Access application in which the user can select a bitmap
file from many that might exist on the hard drive. My code so far uses a
callback function to fill a list box that contains file names. The callback
function uses the FileSearch object to find files. The code for the the
FileSearch object contains:
With Application.FileSearch
.NewSearch
.FileName = "*.bmp"
.LookIn = "C:\"
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Execute
End With
My problem is that FileSearch seems to search my hard drive until it finds
the first subfolder that contains a .bmp file, lists .bmp files in that
subfolder and its subsidiary subfolders, then quits. It doesn't go back to
the root folder and search for .bmp files in other subfolders, as I expected
and need.
I shall appreciate any suggestions about how I can create a list of .bmp
files that exist in any folder on the hard drive.
GP
file from many that might exist on the hard drive. My code so far uses a
callback function to fill a list box that contains file names. The callback
function uses the FileSearch object to find files. The code for the the
FileSearch object contains:
With Application.FileSearch
.NewSearch
.FileName = "*.bmp"
.LookIn = "C:\"
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Execute
End With
My problem is that FileSearch seems to search my hard drive until it finds
the first subfolder that contains a .bmp file, lists .bmp files in that
subfolder and its subsidiary subfolders, then quits. It doesn't go back to
the root folder and search for .bmp files in other subfolders, as I expected
and need.
I shall appreciate any suggestions about how I can create a list of .bmp
files that exist in any folder on the hard drive.
GP