Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling FileOpen Dialogue (Access 2K)

    In the 2003 Microsoft Access Northwind sample database, the Employees form shows a photo as part of personal details. This has an associated Add/Delete button, which invokes the Office File Open dialog, which is a pretty smooth way to allow a user to choose where the photo is located (IMHO).
    I want to use code like this so users do not have to open the table directly and do Insert Object, which I don
    Silverback

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

    Re: Calling FileOpen Dialogue (Access 2K)

    The FileDialog object was introduced in Office XP (2002), it is not available in Access 2000. The database attached to <post#=304,810>post 304,810</post#> (Access 97 format) contains a class module and a module that you can import into your database. They provide a File Open and File Save dialog that will work in any version of Access. The form in the database demonstrates how it can be used.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling FileOpen Dialogue (Access 2K)

    Thank you, again, Hans.
    Code incorporated.
    Silverback
    Silverback

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling FileOpen Dialogue (Access 2K)

    Hans
    I am now on Office 2003 so am trying again to get the MS Northwind file opening Visual Basic to work.
    I now have FileDialog object but for some reason the parameter msoFileDialogFilePicker (used by Northwind) is not available in my database. When I prompt VB with FileDialog, the only choices I'm given are msoFileDialogFolderPicker, msoFileDialogOpen and msoFileDialogSaveAs.
    However, when I run Northwind, it works OK and does not error so msoFileDialogFilePicker must do something!
    Do I need to switch something on? Is it a function of me running Office2003 on Windows2000?
    Any pointers would be gratefully received.
    Thanks
    Silverback.
    Silverback

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

    Re: Calling FileOpen Dialogue (Access 2K)

    Select Tools | References... (in the Visual Basic Editor).
    Make sure that Microsoft Office 11.0 Object Library is ticked (selected).

    If it still doesn't work, you can replace msoFileDialogFilePicker with its value 3.

Posting Permissions

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