Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

Displaying folder files in listview control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Warthen - 13 May 2008 20:59 GMT
I've been trying to figure out how to get the Active X listview control to
display a list of files in a folder, given the path of the folder on an
Access 2007 form.   I've looked all over for samples and am striking out
everywhere I look.  Any help will be greatly appreciated.

Ken Warthen
kenwarthen@gmail.com
Ken Warthen - 14 May 2008 14:13 GMT
I figured out the following solution that seems to work.
...
   strDirectory = strPath & "\"
   intRC = 0
   strFileName = Dir(strDirectory & "*.*")
   Do While strFileName <> vbNullString
       intRC = intRC + 1
       fDate = Format((FileDateTime(strDirectory & strFileName)),
"mm/dd/yyyy")
       With objlist
           Set objItem = .ListItems.Add(, , strFileName)
           objItem.ListSubItems.Add , , Nz(fDate, "")
           objItem.ListSubItems.Add , , Nz(strPath, "")
       End With
       strFileName = Dir()
   Loop

> I've been trying to figure out how to get the Active X listview control to
> display a list of files in a folder, given the path of the folder on an
[quoted text clipped - 3 lines]
> Ken Warthen
> kenwarthen@gmail.com
Maurice - 15 May 2008 08:55 GMT
Ken,

Great stuff, don't forget to put a clear statement in the beginning if you
want to start a new search...

objList.items.clear

Signature

Maurice Ausum

> I figured out the following solution that seems to work.
> ...
[quoted text clipped - 20 lines]
> > Ken Warthen
> > kenwarthen@gmail.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.