List Files in a Folder and its Subfolders
In response to a request in the MSDN Forums, I have decided to create and share this demo.
This demo uses the File System Object (FSO) to traverse through a folder structure and list all the files that match the user's specifications. The user can provide a search keyword to match with the file names and also provide a list of valid file extensions to return during the search.
The result of the search is displayed using a Listbox. This version of the demo (v1.0) uses a Value List, which has a limit on the RowSource property, so a warning is displayed if the number of files found exceeds this limit (32,750 characters).
In a future version, I will try to use a table to store the file names to avoid the RowSource property limit.
This demo was created using Access 2010 and tested using Access 2010 and 2016 (but it should also work with 2007 and 2013.)
Version 1.1 includes a count of files found and displays a partial listing of files if the number of files found exceeded the limit to display in the Listbox.
Please report all bugs to theDBguy@gmail.com.