Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SaveAs Dialog Box Access 2000

    I am trying to export an access report to excel. I can currently export the data and save it by hard coding the file location. I want to prompt the user for the location where they want to store it. I am not sure how to do this in Access 2000. From what I do understand is the built in FileDialog do not work in 2000?

    Thanks,

  2. #2
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what I have to save the report to the hard code location. I want to prompt for the location though.

    Private Sub btnExport_Click()
    DoCmd.OutputTo acOutputReport, "Report Hourly", acFormatXLS, "C:\Dropbox\Report Hourly.xls"

    End Sub

  3. #3
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts

  4. #4
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried that and the code from Listing C where it makes declarations does not compile.

  5. #5
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    See if this one works: http://www.ammara.com/access_image_f...en_dialog.html. You can download the code.

  6. #6
    Star Lounger tgw7078's Avatar
    Join Date
    Jul 2010
    Location
    Seattle, WA., USA
    Posts
    90
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Try this:
    API: Call the standard Windows File Open/Save dialog box
    http://access.mvps.org/access/api/api0001.htm
    Tom Wickerath
    Microsoft Access MVP
    4/1/2006 - 3/31/2012

  7. #7
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you use the following command:

    DoCmd.OutputTo acOutputReport, "Report Hourly", acFormatXLS, "C:\Dropbox\Report Hourly.xls"

    And leave off the location it will automatically prompt you for a location.

Posting Permissions

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