Hi Guy's i have had a quick search on the web but can't find a method of this one that I would guess is quite simple.
I am populating a combo box full of file names but what i want to try is to only add a list where another combo box is selected with the first letter such as:
Selection combo
Adam
Andrew
Brian
Bob
Charlie
Chris
Colin
David
Dennis
Daniel
etc....
My code will list all files where these file names are located, where would i add a string when if i select Bob for example, the file names populated only shows files that start with the letter B ?
I know it would likely be Len Function but how do I add to oFile Name ?
cboImages are populated from after update of a combo listing form a table called cboSelect
So i'm guessing it is using Len(cboSelect,1) but its how and where do i add in the code below ?
Code:Dim oFSO As ObjectDim oFolder As Object Dim oFile As Object Dim i As Integer Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder("T:\Server\Enquiry Pics\") For Each oFile In oFolder.Files Me.cboImages.AddItem oFile.Name i = i + 1 Next oFile