The following code will look through all subfolders, returning mdb files to a table. Amend, play etc!
Set rstMDB = CurrentDb.OpenRecordset("Found", dbOpenDynaset)
With Application.FileSearch
.NewSearch
.LookIn = "k:\"
.SearchSubFolders = True
.FileName = ""
.MatchAllWordForms = True
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
If Right(.FoundFiles(i), 3) = "mdb" Then
FileNo = FileNo + 1
rstMDB.AddNew
rstMDB("FileName") = .FoundFiles(i)
rstMDB.Update
End If
Next i
MsgBox "TOTAL FILES: " & FileNo
Else
MsgBox "There were no files found."
End If
End With