Allen Browns List files recursively

S

StuJol

this is a query relating to allen browns List files recursively contribution
via http://allenbrowne.com/ser-59.html

brilliant contribution, works really well. the only issue i have is the full
path and filename are displayed in the list box, so my list box needs to be
the size of the screen to view full path.

Is there a way to just get the listbox to display the filename to the user
but to also keep the filename and path hidden so that the double click
hyperlink still works to open the documents??
 
T

Tom van Stiphout

On Tue, 1 Jun 2010 04:56:04 -0700, StuJol

That doesn't seem a good idea: several versions of a document by the
same name can occur in the tree. If I only show "test.doc", how would
the user know what to select?
That said, listboxes can have multiple columns, including invisible
ones.

-Tom.
Microsoft Access MVP
 
S

StuJol

thaks for your comments tom,
there will only be one version of each document so i dont see it an issue,
can you explain how to get multiple columes and change the visibility??
 
T

Tom van Stiphout

On Tue, 1 Jun 2010 09:31:01 -0700, StuJol

Sure. It's very simple. Since you are looping over a folder tree I am
assuming you're adding rows one at a time. Set the RowSourceType to
"ValueList". Then call AddItem for each row:
myList.AddItem(strFilename, strFilePath)
This would add one filename and one full path.
Then you can hide the Path column by setting the ColumnWidths property
to "1;0"

-Tom.
Microsoft Access MVP
 
T

Tom van Stiphout

On Wed, 02 Jun 2010 06:45:30 -0700, Tom van Stiphout

Sorry, I meant:
myList.AddItem(strFilename & ";" & strFilePath)
 
S

StuJol

Tom, thanks for your continued support. i understand what your saying but im
struggling to intergrate in into allen browns code... can you find time to
review allens code (link in orginal question) and help me to intergrate...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top