I'm building a program that finds files that begin with a certain string, and adding them to a list. It's not working on a few computers, but does on others. I've found the problem to be with the LOOKIN line. When i set the fs.lookin it doesnt actually change the folder.
i put that message box to print the actual folder its searching. On most of the pcs it shows "g:\archiveap" like its supposed to. On others, the folder stays set to "My Documents". It is also the only function of FileSearch that didn't automatically capitalize when i typed it in: "lookin" instead of "Lookin". All pcs have Access 2002 with the references to Access 10.0 Object Library. Any Ideas?
Thanks
-Pete
Code:
Set fs = Application.FileSearch
fs.lookin = "g:\archiveap"
MsgBox (fs.lookin)
fs.Filename = "APACP" & ComboReportname.Value & "_" & ListYear.Value & ListMonth.Value & "*"
fs.Execute
For i = 1 To fs.FoundFiles.Count
lstFiles.AddItem Dir(fs.FoundFiles(i))
Next i
i put that message box to print the actual folder its searching. On most of the pcs it shows "g:\archiveap" like its supposed to. On others, the folder stays set to "My Documents". It is also the only function of FileSearch that didn't automatically capitalize when i typed it in: "lookin" instead of "Lookin". All pcs have Access 2002 with the references to Access 10.0 Object Library. Any Ideas?
Thanks
-Pete