Alan, that's not really part of the recordset operation, but more along the lines of file input/output. I will be covering the DIR function in detail in an upcoming VB and Access class.
Essentially, the first Dir command establishes WHAT we're looking for:
FN = Dir("C:\*.TXT", vbNormal)
This says assign FN (filename) to all of the normal files (not directories or hidden files - vbNormal) that match the specification "C:\*.TXT". It returns the FIRST file that matches that parameter.
Now, each time you loop, you need to get the next filename, but you don't want Dir to start over, and you don't need to change your spec, so you just say:
FN = Dir
inside your loop. That instructs VB to just get the next filename. See how easy this stuff is once it's properly explained? :)
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.