I need to be able to find all access databases on my c:\ via code within Acccess. The code I have written is as follows:
Private Sub cmdFindFiles_Click()
Dim strFileName, strPath As String
strPath = "c:\*.mdb"
strFileName = Dir$(strPath)
Do While strFileName > ""
'some code is entered here to update table with results
strFileName = Dir$
Loop
End Sub
The problem is it only finds files within the root direcory of C:\ and not the whole of the c:\drive's folders etc.
Any help would be appreciated.
Private Sub cmdFindFiles_Click()
Dim strFileName, strPath As String
strPath = "c:\*.mdb"
strFileName = Dir$(strPath)
Do While strFileName > ""
'some code is entered here to update table with results
strFileName = Dir$
Loop
End Sub
The problem is it only finds files within the root direcory of C:\ and not the whole of the c:\drive's folders etc.
Any help would be appreciated.