Results 1 to 7 of 7
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Browsing for a File (A2K, SR1)

    ... I would like to give users the ability to browse (search, explore,...) for a file from Access and then open the file. For example, on a form, can it be set up such that a user could see all available drives, click on a drive and see all of the folders, click on a folder and see files. The ultimate goal would be to select a file and open it. (Similar to the windows explore feature).

    I could have the users just type in the path and filename, but, that is just too much work. Besides, they (being the users) can't type well anyway and just cause errors due to spelling errors.

    The ultimate goal is to have the ability for Access to automatically open an MS Project file selected by the user and then save the file as an MS Access Database which will then be accessed to extract MS Project data.

    Any thoughts on this would be appreciated. ... Of course, if you have any other ideas on how to open and save the MS Project database will be appreciated as well.

    Thanks.

    Any Ideas??
    Regards,

    Gary
    (It's been a while!)

  2. #2
    New Lounger
    Join Date
    Jan 2002
    Location
    Wales
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browsing for a File (A2K, SR1)

    Thought about using a tree view? Not easy and a lot of coding to be done. I should think that there's something on this in the archive files somewhere
    Regards
    Waring Thin

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Browsing for a File (A2K, SR1)

    Thanks. Now that you mention it, I do remember some posts on this. I will give it a try.
    Regards,

    Gary
    (It's been a while!)

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browsing for a File (A2K, SR1)

    Open a form in design view.
    From the tools menubar, click More Controls (hammer + wrench).
    Click Microsoft Common Dialog Control, & put it on your form somewhere. It will be invisible at run time. Set properties to suit.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browsing for a File (A2K, SR1)

    The code for the FileOpenSave common dialog is readily available in a number of places on the web, including <A target="_blank" HREF=http://www.mvps.org/access/>http://www.mvps.org/access/</A>. It is also included in FMS TotalSourcebook product and in the Access Developer's Handbook.

    You can, as Peter suggested, use the common dialog control if you have the developer's version so that you can distribute it with your application. Otherwise, get the code that calls the common dialog directly and use that. It also breaks less frequently than calling the common dialog control in Access, particularly if you might run into a mixture of Office/VB versions out there.
    Charlotte

  6. #6
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Browsing for a File (A2K, SR1)

    Thanks everyone for your help. I will try the code that Charlotte suggested.
    Regards,

    Gary
    (It's been a while!)

  7. #7
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Browsing for a File (A2K, SR1)

    ...Thanks again Charlotte. The WEB link provided allowed me to find just what I was looking for.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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