Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying contents of a shared drive folder in a form

Status
Not open for further replies.

Hatchetman240

Technical User
Aug 21, 2003
20
0
0
US
Hello,

I am currently looking for a way to display the contents of a specific folder on the network as a list of options to choose in a form. I would like to be able to launch the files and filter the results if possible bu query. How can this be done?

 
Hi Hatchetman,

I'm looking to solve the same problem any luck yet...
 
Not sure where I got this from but load a table the use the table. Or change code to get parameters

Private Sub Command0_Click()
Dim MyFolder$, myfile
Dim rst As DAO.Recordset
MyFolder = "H:\directory\*.mdb"
Set rst = CurrentDb.OpenRecordset("Table1")
myfile = Dir(MyFolder)
With rst
While myfile <> &quot;&quot;
.AddNew
.Fields(0) = myfile
.Update
myfile = Dir
Wend
.CLOSE
End With
Set rst = Nothing
Me.List1.RowSource = &quot;select * from table1&quot;
End Sub


Private Sub List1_Click()

Dim myhyperlink As Hyperlink
FollowHyperlink &quot;C:\garys Junk\data bases\&quot; & Me!List1.Value


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top