Combo Boxes - Cascading Folders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ehsan arman
    New Member
    • Jan 2011
    • 49

    #16
    sorry, that's the best I could do in terms of explaining the issue at hand. I don't know what else I could add to make things clearer, but it's ok I am thinking of using a different approach to avoid using a 2nd Combobox. This will fix the problem.
    Thank you.

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #17
      I don't understand all the confusion. If you read the articles, then you know that you need to use the after update event of the combo box to fill the second combo box.

      Knowing that, you just need code to fill that combo box based on the selection in the first combo box. You already have that code. The only change you need to make is to make the path dynamic rather than static.

      So then really all you need to do is
      folderspec = Me!Combo29

      It's practically a copy and paste job.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #18
        I too, find it hard to understand your difficulty. You just have to read what I've said (I've laid it all out pretty fully I thought), then respond to each point or question. Never mind. Sometimes understanding other people is more complicated than one would guess. At this point I see no profit from delving further into this aspect.

        As a parting suggestion, I would consider a setup where you still have two ComboBoxes, but also a TextBox - Let's call them cboFolder, cboFile and txtFullFolder - and every time a folder is selected from cboFolder do all three of :
        1. Update txtFullFolder to reflect the full folder name of the currently selected folder.
        2. Update cboFolder to show the subfolders of the current folder
        3. Update cboFile to show the matching files of the current folder.


        I believe this approach would serve your requirement well. The .SubFolders collection will give you the available folders. I would guess there would be a similar collections for files, probably called .Files. I would expect that to be all you need to arrive at a smoothly working solution, but I'll leave that with you now as communication between us seems overly difficult.

        Comment

        Working...