Hi I have two Combo boxes on a form:
1- Neighbourhood
2- Invoice
in the neighbourhood combo box I read in folder names on a particular drive(so whatever is the folder names are say on X:\Construction appear in the combo box).
what I want to be able to do is by selecting one of the neighbourhoods in the first combo box have the 2nd one show only whats inside the selected neighbourhood(s o to essentially show the subfolder names within the selected neighbourhood folder. For example if I select Laurier Heights as the neighbourhood I want the Invoice Combo box to show whats inside that folder.
I have used the following code for filling up a combo box with folder names:
1- Neighbourhood
2- Invoice
in the neighbourhood combo box I read in folder names on a particular drive(so whatever is the folder names are say on X:\Construction appear in the combo box).
what I want to be able to do is by selecting one of the neighbourhoods in the first combo box have the 2nd one show only whats inside the selected neighbourhood(s o to essentially show the subfolder names within the selected neighbourhood folder. For example if I select Laurier Heights as the neighbourhood I want the Invoice Combo box to show whats inside that folder.
I have used the following code for filling up a combo box with folder names:
Code:
Dim fs, f, f1, fc, s Dim folderspec folderspec = "X:\Construction\Engineering\Upgrading Group\Mature Neighbourhood Rehab Drainage\2. CCTV\2.07 Invoices\" Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderspec) Set fc = f.SubFolders For Each f1 In fc Me!Combo29.AddItem f1.Name Next f1
Comment