Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Thumbs down Unanswered: Sub folder limitation?

    When I run the command
    DoCmd.OutputTo acOutputReport,

    there seems to be a limitation of 3 levels of folders or sub-folders..

    if I want C:\main\month\august\today\filename.xls

    this will not work,
    but

    C:\main\month\august\filename.xls

    will work.

    Is there a way around this? Or is it really a limitation?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    just curious... what was the specific format of "today"?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Very good spot Ted!
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Nov 2003
    Posts
    300
    not exactly sure what you mean by format.

    they are all folder names so I would guess that the format is the same.
    there are no spaces or special characters in the name.
    the folder names are already created.


    Is that what you mean?

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Would you mind humoring me and providing an actual sample file path that doesn't work? Fresh eyes can sometimes help.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Specifically the string that you have tried to use to save the excel file as well as the actual file path.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Nov 2003
    Posts
    300
    Private Sub rptExecutive_Click()
    On Error GoTo Err_rptExecutive_Click

    Dim stDocName As String

    stDocName = "rptExecutive"
    DoCmd.OpenReport stDocName, acPreview

    DoCmd.OutputTo acOutputReport, "rptExecutive", "Excel97-Excel2003Workbook(*.xls)", "C:\Documents\Applications\Reports\Monthly\Summary .xls", False, "", 0, acExportQualityPrint

    Exit_rptExecutive_Click:
    Exit Sub

    Err_rptExecutive_Click:
    MsgBox Err.Description
    Resume Exit_rptExecutive_Click

    End Sub

  8. #8
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I would doubt that the number of subfolders has anything to do with it. I would suggest naviagting to the folder in WIndows Explorer and then copying and pasting the path into your code. Maybe there is a typo you aren't seeing.

    The other issue might be a permission issue. Can you create a text file in the folder? Save, edit, etc. the file?

    Finally, I did notice you have a space between Summary and .xls in your code. Shouldn't matter but just wanted to mention it.

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    "C:\Documents\Applications\Reports\Monthly\Sum mary .xls" doesn't work, but:

    "C:\Documents\Applications\Reports\Summary .xls" does?

    There's a space between Summary and .xls btw, might want to double check and see if that's an issue.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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