Results 1 to 14 of 14
  1. #1
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    How To Use FileSystemObject (Access 2000)

    I want to implement a Browse button on a form in my database that the user can use to identify a file that is needed. I believe I've seen a number of articles by Helen Feddema in the Access Watch newsletter on how to do this using the fso library but I haven't been able to locate any article. Can someone either identify an article or write-up for me or tell me what I need to know in order to use the fso technique?

    Thanks,
    Bill

  2. #2
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How To Use FileSystemObject (Access 2000)

    Hi Bill,
    Does this reply by Hans give you a start? <post:=736,870>post 736,870</post:>
    There is also Access Archon 185 on this page in Helen Feddema's web site.
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

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

    Re: How To Use FileSystemObject (Access 2000)

    FileSystemObject is used to get at files and folders in code, it won't let the user browse. You can use Application.FileDialog for the latter - see for example <post:=735,585>post 735,585</post:>.

  4. #4
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    Hans,

    Those code samples look very promising. I'll see what I can do with that.

    I looked at your sample code for using fso and I see what you mean about it not providing what I want.

    Thanks,
    Bill

  5. #5
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    Thanks for the link to that fso code sample. As Hans pointed out in his reply to me, fso does not provide the functionality that I want but I'm glad to get that sample so I'll be able to find it when I need it. I'll look at Helen's project too. I never did figure out a way to do any kind of search on her web site. Did you just happen to know about that project or did you do a search to find it?

    Thanks,
    [tabBill

  6. #6
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    Hans,

    I apparently need to add/activate something more in order to get the FileDialog stuff to compile. I'm getting a "variable not defined" error on the "msoFileDialogFilePicker" parameter. I imagine that is a defined constant in some library but I haven't figure out which one. Will I need anything more for the FileDialog thing to be recognized after the constant is defined?

    Thanks,
    Bill

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

    Re: How To Use FileSystemObject (Access 2000)

    Set a reference (in Tools | References) to the Microsoft Office 9.0 Object Library. (9.0 is the internal version number for Office 2000)

  8. #8
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    Hans,

    I thought I had that one already active but I didn't. However, when I tried to find it in the list of libraries, the only MS Office Object library listed is 12.0! I have checked/activated it and that removed the problem with that defined constant but now I get a "Method or data member not found" error on the .FileDialog. Could the version 12.0 be causing that problem? Which version of Office does the 12.0 go with?

    Another strange thing: I have both Access 97 and Office 2000 installed on my PC. They are located under Program Files/Microsoft Office/ in folders named /Office97 and /Office2k. I looked in the /Office97/Office folder and there is a MSACC8.OLB there and in /Office2k/Office there is a MSACC9.OLB there! I haven't been able to find an MSACC12.OLB file but that is the one that is implied by the 12.0 in the name in the Library references list.

    Thanks,
    Bill

  9. #9
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    Hans,

    After a little more investigation I believe that the FileDialog was not made available until Access 2002. I do have some stuff that I put together years ago in Access 97 that will open a file picking dialog box that can be used by a Browse button. I was just trying to get more up-to-date and maybe use a simpler approach! I'll go get the stuff I used to use for this purpose and use it.

    I'm still interested in any thoughts you may have on the library versions puzzle I mentioned in my previous reply to your message.

    Thanks for your help.
    Bill

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

    Re: How To Use FileSystemObject (Access 2000)

    Sorry about that, I should have known! You are correct, FileDialog was introduced in Office XP (2002). <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

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

    Re: How To Use FileSystemObject (Access 2000)

    Office 12.0 is the internal version number for Office 2007. Have you ever had Office 2007 installed on your PC?

  12. #12
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    No, I've never even seen (on a PC) a copy of Office 2007! Strange...

    Thanks,
    Bill

  13. #13
    5 Star Lounger
    Join Date
    Jan 2002
    Location
    Midlothian, Virginia, USA
    Posts
    875
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: How To Use FileSystemObject (Access 2000)

    No problem. I've implemented my old method and it is working fine. In fact it is very easy to use and has been recommended by the gurus on the MS Developer forum on CompuServe several years ago. In case anyone reading this needs this functionality in Access 97 or 2000, I've attached a copy of everything that is needed to this message.

    To use it just copy the contents of the attached file into a new <span style="background-color: #FFFF00; color: #000000; font-weight: bold">Class Module</span hi> and save it as "BrowseForFileClass" and then use 1-5 lines of code in any code module to invoke it. The calling parameters are all documented in the attached file.

    Bill
    Attached Files Attached Files

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

    Re: How To Use FileSystemObject (Access 2000)

    Thanks. Your code will work in all versions of Access.

Posting Permissions

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