List Files

  • Thread starter Thread starter Bob Landers
  • Start date Start date
B

Bob Landers

Hi folks,

I would like to be able to provide the user with a list of files in a
specified folder and its subfolders. So far, I have been able to achieve
this simply by using the filesystemobject and outputting the resulting list
of file and folder names to a valuelist box on my access form.

However, I would also like incorporate the following features into my list:
(1) an icon to the left of the filename indicating the file type type, eg a
word icon for msword files, a pdf icon for pdf files etc; and

(2) the ability for a user to double-click the filename in my list to open
the relevant file.

Can anyone point me to any tutorials or give me some pointers on how to
achieve either of these objectives?


TIA
Bob
 
Thanks for the response John,

Actually, what I'm trying to do is emulate the "Templates" dialog box in MS
Word.

I want my own templates to appear and behave much the same as the templates
in the MSWord templates dialog box.


Regards
Bob
 
The one you get when you do File|New and then click "On my computer"? I
believe that uses a ListView control. I've never needed to use one
myself.



Thanks for the response John,

Actually, what I'm trying to do is emulate the "Templates" dialog box in MS
Word.

I want my own templates to appear and behave much the same as the templates
in the MSWord templates dialog box.


Regards
Bob
 
That's the one.

I'm using a listview control at the moment, but all I have succeeded in
doing so far is providing a list of the files and subfolders in my Templates
directory. I would like the list to contain little icons beside each
filename/subfolder listed (just like microsoft's template picker). By the
way, I don't just want this for my templates - I am creating this database
for my office and I would like to be able to use the same code/method to
provide a list of all documents (doc/pdfs/emails) on our system that relate
to a particular client so that a user searching for related files simply has
to double click a filename in my list in order immediately to open the file
without having to drill down to the correct directory on our server first.

Getting off-track a bit, I was also hoping to create separate tabpages for
each subfolder in my templates directory - again much like microsoft's
template picker. But it would appear that you can't create tabpages on the
fly. Without digressing from my current query too much, do you know of any
work around for this? (I'd rather than not hardcode the individual pages
since I would prefer to provide the user with as much flexibility as
possible when creating templates.) At present, I've got all the templates
being displayed/listed on one listview control on single tabpage.


Regards
Bob

John Nurick said:
The one you get when you do File|New and then click "On my computer"? I
believe that uses a ListView control. I've never needed to use one
myself.
 
Access can modify its forms under program control, but it's not a
practical process for normal operational use. But there's no obvious
reason why you shouldn't create a reasonable number of tabs and hide the
ones that aren't needed at any given time.

It's not as if this will be a large number. Once a tab control has more
than one row of tabs it becoms a less practical UI, and with three or
more rows it's awful, so if you expect to regularly need more than about
eight folders you should probably be looking for a different metaphor.
If you create 20 tabs it's more than enough. (Also, tabs are a hopeless
metaphor for a hierarchical structure of folders and subfolders.)

On the other hand if you *do* need lots of folders and subfolders, how
about a TreeView control to handle the folders, with a ListView
alongside for the files, allee samee Windows Explorer?

That's the one.

I'm using a listview control at the moment, but all I have succeeded in
doing so far is providing a list of the files and subfolders in my Templates
directory. I would like the list to contain little icons beside each
filename/subfolder listed (just like microsoft's template picker). By the
way, I don't just want this for my templates - I am creating this database
for my office and I would like to be able to use the same code/method to
provide a list of all documents (doc/pdfs/emails) on our system that relate
to a particular client so that a user searching for related files simply has
to double click a filename in my list in order immediately to open the file
without having to drill down to the correct directory on our server first.

Getting off-track a bit, I was also hoping to create separate tabpages for
each subfolder in my templates directory - again much like microsoft's
template picker. But it would appear that you can't create tabpages on the
fly. Without digressing from my current query too much, do you know of any
work around for this? (I'd rather than not hardcode the individual pages
since I would prefer to provide the user with as much flexibility as
possible when creating templates.) At present, I've got all the templates
being displayed/listed on one listview control on single tabpage.


Regards
Bob
 
John,

Thanks for your comments regarding the tab control. Another person on this
board has suggested a similar approach too. I'm going to run with it.
Thanks.


Regards
Bob

John Nurick said:
Access can modify its forms under program control, but it's not a
practical process for normal operational use. But there's no obvious
reason why you shouldn't create a reasonable number of tabs and hide the
ones that aren't needed at any given time.

It's not as if this will be a large number. Once a tab control has more
than one row of tabs it becoms a less practical UI, and with three or
more rows it's awful, so if you expect to regularly need more than about
eight folders you should probably be looking for a different metaphor.
If you create 20 tabs it's more than enough. (Also, tabs are a hopeless
metaphor for a hierarchical structure of folders and subfolders.)

On the other hand if you *do* need lots of folders and subfolders, how
about a TreeView control to handle the folders, with a ListView
alongside for the files, allee samee Windows Explorer?
 
Back
Top