Results 1 to 3 of 3

Thread: Help on creating a special table

  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Help on creating a special table

    I need help on how to create a table that is populated with file names read from various directories on the hard drive. I am pretty new to Access and would appreciate any help.

    Thanks

  2. #2
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    2
    As far as the directories are concerned, you could write a series of update queries as an event, if you point to the path on your hard drive. If you could give me more of an idea as to what you're trying to do, I might be able to help you.

  3. #3
    Join Date
    Feb 2003
    Posts
    102

    my 2 cents

    How are you going to access the file system using JET???? SQL doesn't know it exists.

    Why do you want to store information you can get dynamically using VBA?

    The only way I can see to do it is to use VBA.


    Code stolen from 7.0 help file:

    ' Display the names in C:\ that represent directories.
    MyPath = "c:\" ' Set the path.
    MyName = Dir(MyPath, vbDirectory) ' Retrieve the first entry.
    Do While MyName <> "" ' Start the loop.
    ' Ignore the current directory and the encompassing directory.
    If MyName <> "." And MyName <> ".." Then
    ' Use bitwise comparison to make sure MyName is a directory.
    If (GetAttr(MyPath & MyName) And vbDirectory) = vbDirectory Then
    Debug.Print MyName ' Display entry only if it

    End If ' it represents a directory.
    End If
    MyName = Dir ' Get next entry.
    Loop

    HTH,

    Peter

Posting Permissions

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