vanillapod
MIS
I've got a database that looks for *.xls files in in C;\. It all worked fine but now has stopped working. I've just moved to ms access 2002 is this the problem? My code is:
Cheers in advance...
Private Sub Form_Load()
Dim strfilelist As String
Dim i As Integer
Dim strLocation As String
strLocation = "C:\"
With Application.FileSearch
.lookin = strLocation
.Filename = "*.xls"
.SearchSubFolders = False
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
If Len(strfilelist) > 0 Then
strfilelist = strfilelist + ";"
End If
strfilelist = strfilelist + .FoundFiles(i)
Next i
Me.strfilelist.RowSource = strfilelist
Else
MsgBox "No files found" & vbLf & strLocation
Me.strfilelist.Visible = False
End If
End With
End Sub
Cheers in advance...
Private Sub Form_Load()
Dim strfilelist As String
Dim i As Integer
Dim strLocation As String
strLocation = "C:\"
With Application.FileSearch
.lookin = strLocation
.Filename = "*.xls"
.SearchSubFolders = False
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
If Len(strfilelist) > 0 Then
strfilelist = strfilelist + ";"
End If
strfilelist = strfilelist + .FoundFiles(i)
Next i
Me.strfilelist.RowSource = strfilelist
Else
MsgBox "No files found" & vbLf & strLocation
Me.strfilelist.Visible = False
End If
End With
End Sub