Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for .dat Files from Access 97 mdb

Status
Not open for further replies.

Lobmeister

Programmer
Jul 25, 2001
16
GB
For the last 2 years I've been running an access97 mdb (on windows nt)which contains a module which uses office 8.0 references to perform the following code to search for .dat files :
With Application.FileSearch
.LookIn = "C:\My Documents"
.FileName = "20*.dat"
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With

I've recently had to move this mdb to a win2k platform and now this code does not work - please help !!!!!!!

PS. Could it have something to do with office2000 being preloaded on this present pc and subsequently uninstalled and replaced with office97 ?
 
Hey there!

You could try adding a reference to vbscripting and then use the FileSystemObject.

There's loadsa help out there on how to use it...

Hope that helps!
Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top