Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output not assigning File extension (.PDF)

Status
Not open for further replies.

JStrand

Technical User
Nov 14, 2011
44
0
0
US
I have a function running properly with reports all being output to a directory. The file is not getting assigned the proper extension .pdf, just blank extension. Therefore the user has to select Acrobat as the application when double clicking on the file name. I have used the following declaration in my function which I thought would assign the .pdf but it is not working as I thought it would. Can anyone see a problem with the method I 've chosen or syntax problems? I've only pasted the lines of code pertaining to the output format below. Thank you.
--------------------------------------------------------

Function ScorecardReports()

Dim strOutputFormat As String
strOutputFormat = "PDF Format (*.pdf)"

Dim strObjectName As String
strObjectName = "BranchScorecardRprt"

DoCmd.OutputTo acReport, strObjectName, strOutputFormat, "\\Analysis and Reports\Scorecard\BranchScorecardRprt" & "-" & strBranchName, False,
 
Problem solved. Solution provided in earlier post. Sorry

DoCmd.OutputTo acReport, strObjectName, strOutputFormat, "\\Analysis and Reports\Scorecard\BranchScorecardRprt" & "-" & strBranchName & ".pdf", False, ""
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top