Results 1 to 3 of 3
  1. #1
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Trying to send a report to a subfolder

    Hello again folks!



    I am trying to output a report (in pdf format) to a subfolder on my hard drive. I cannot figure out the proper syntax to get it into the subfolder - I can get it into the main Project folder - but not the Proposals subfolder. The folders are created at the beginning of a bid.

    Code:
    'On Error GoTo Err_Command245_Click
     
    Dim stDocName As String
    Dim myPath As String
     
    stDocName = "ProposalReport"
    myPath = (Forms!proposals!FullPath + gc1name + stDocName)
     
     
    DoCmd.OutputTo acReport, stDocName, acFormatPDF, myPath + ".pdf", True
     
     
     
    'Err_Command245_Click:
    'MsgBox Err.Description
     
    End Sub
    Note: I have commented out my error handling to eliminate the issue I was having with the runtime error "the output to action was cancelled".

    Right now, I grab the full path from a text box on my form: FullPath=[workingdir] & [jobinfo] Results in: C:\Clients\Customer Name\E14-2695 December 3 Job Test\Proposals. Workingdir comes from: =Left([CurrentProject].[FullName],InStrRev([CurrentProject].[FullName],"\")) and jobinfo from:=[Forms]![proposals]![JOBID] & " " & [Forms]![proposals]![JOB NAME] & "\Proposals".

    Any help will be much appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Does the string have all necessary back slashes, such as the one following Proposals?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    AH-HA! Thank you June7 (again)! That's exactly what was missing.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Send Report to webservice
    By Vanam in forum Reports
    Replies: 5
    Last Post: 11-25-2013, 05:04 AM
  2. PLEASE HELP Send Report to MkDir Path
    By alyon in forum Access
    Replies: 17
    Last Post: 12-06-2011, 05:56 PM
  3. Send Report to a NEW file
    By alyon in forum Access
    Replies: 9
    Last Post: 12-06-2011, 12:57 PM
  4. Help Send Report to File.
    By alyon in forum Access
    Replies: 4
    Last Post: 08-22-2011, 10:37 AM
  5. send object report
    By ldappa in forum Access
    Replies: 1
    Last Post: 07-19-2010, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums