Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    View a directory withing access form (2000/2003)

    Hi,

    Is there a way of browsing a set directory on my computer in a tree like view like how explorer works.

    I have been messing about with TreeCtrl with no success.

    Many thanks
    Regards
    Gerbil (AKA Kevin)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: View a directory withing access form (2000/2003)

    Not exactly what you ask, but Application.FileDialog lets you browse for files or folders:

    Display files:

    Sub ShowFiles()
    With Application.FileDialog(msoFileDialogFilePicker)
    .InitialFileName = "C:Access*.*"
    If .Show Then
    MsgBox "You selected " & .SelectedItems(1), vbInformation
    Else
    MsgBox "No file selected", vbInformation
    End If
    End With
    End Sub

    Display folders:

    Sub ShowFolders()
    With Application.FileDialog(msoFileDialogFolderPicker)
    .InitialFileName = "C:"
    If .Show Then
    MsgBox "You selected " & .SelectedItems(1), vbInformation
    Else
    MsgBox "No folder selected", vbInformation
    End If
    End With
    End Sub

Posting Permissions

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