Results 1 to 2 of 2

Thread: read file

  1. #1
    Join Date
    Apr 2004
    Posts
    15

    Arrow Unanswered: read file

    how can i use ms access to read all the filename in a certain folder with a filter applied and all the filename stored in an array?

    thanks for any advice

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    look in the Help file for a VBA command called DIR

    In short, use a loop and have an array ready.

    strValue = DIR("Path\File*.*") 'this gives the first item returned in the directory search

    iC = 1
    strArray(iC) = strValue
    strValue = ""

    Do
    iC = iC + 1
    strValue = DIR ' this gets the next item in the returned search
    if strValue <> "" then strArray(iC) = strValue ' DIR returns an empty string if the search yield nothing, or when it has exhausted the items it found
    Loop Until strValue = ""

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •