List the filenames in a directory

hangglide

Hangglider
Local time
Today, 15:40
Joined
May 9, 2001
Messages
35
I am trying create a form that will list specific files in a specific directory.

The directory contains multiple types of files (pdf, jpg, doc, etc...).

All the files in the directory begin (first ten digits) with the recordID that corrosponds to the database recordID.

So... when the form opens to recordID "20041Z123W", I would like all the files that begin with those ten characters to populate some kind of textbox or listbox.

eg...
20041Z123W_abc.pdf
20041Z123W_01.jpg
20041Z123W_02.jpg
20041Z123W_abc.doc

Ideally, these file names would then be clickable (like a hyperlink) to open the file (outside of Access).

Does anyone have any suggestions?

I think the part tripping me up is the populating the textbox (or listbox or whatever) with the filenames... How do I get the list of file names from the directory?

Thanks in advance,

Leo
 
Last edited:
dcx693 said:
Did you try searching the forum yet? Try: Listing a Directory in a Listbox

Thank you.. I did try searching but I didn't know what I was looking for. I found stuff on directory boxes but I missed the link you pointed to.

Thanks again,

Leo
 

Users who are viewing this thread

Back
Top Bottom