Directory of drive to a listbox on a form. (1 Viewer)

bodhran1

Dazed and Confused
Local time
Today, 13:05
Joined
Mar 27, 2002
Messages
43
I need some help. Only a few weeks of Access under my belt so far, and we haven't cover this topic in class yet.

I 've found a half dozen methods to read my directory, but I don't know how to pass the data to my form.

I use the following lines to read a list of all the files with the extension ".asc".

On my form, I have a listbox called "test1"

What value do I need to specify to get the info there?

I can see the filenames in my MsgBox, so I know it's reading them OK.


Dim myfile As String
myfile = Dir("x:\*.asc", vbNormal)
Do While Len(myfile) > 0
DoCmd.GoToRecord , , acNewRec
MsgBox (myfile)
Forms![LOG_BACK]![test1] = myfile
myfile = Dir
Loop

You people are the best!! I've learned more just by reading your suggestions here than school has taught me.
 

bodhran1

Dazed and Confused
Local time
Today, 13:05
Joined
Mar 27, 2002
Messages
43
Also...

Do I need to change my "Row Source Type" or anything?
 

Users who are viewing this thread

Top Bottom