UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Send Report In Pdf Format To Folder, Access 2016    
 
   
mike60smart
post Aug 10 2019, 02:05 PM
Post#1


UtterAccess VIP
Posts: 13,350
Joined: 6-June 05
From: Dunbar,Scotland


Hi Everyone

I have the following On Click Event which places a copy of the Current Report to a Folder named C:/Reports

It creates the file name OK but the actual file is not in PDF Format?

Any help appreciated

Code is:-

CODE
Private Sub Command177_Click()
Dim strDocName As String
Dim strDir As String

strDocName = "rptAsmeSingle"
    
If Me.Dirty Then Me.Dirty = False   ' force a save

DoCmd.OpenReport "rptAsmeSingle", acViewPreview
If Dir("C:\Reports", vbDirectory) = "" Then MkDir "C:\Reports"

DoCmd.OutputTo acOutputReport, "rptAsmeSingle", acFormatPDF, "C:\Reports\" & Format(Date, "yyyymmdd") & "-" & [txtWelderNo] & "-" & [WPQNo], False
  
End Sub

--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 
theDBguy
post Aug 10 2019, 02:07 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,301
Joined: 19-June 07
From: SunnySandyEggo


Hi Mike. That's probably because you may have forgotten to include the ".pdf" file extension to the file's name.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mike60smart
post Aug 10 2019, 03:11 PM
Post#3


UtterAccess VIP
Posts: 13,350
Joined: 6-June 05
From: Dunbar,Scotland


Hi theDBGuy

Well that fixed it

Many thanks yet again

cheers.gif

--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 
theDBguy
post Aug 10 2019, 03:20 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,301
Joined: 19-June 07
From: SunnySandyEggo


Hi. Glad to hear it worked. Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    17th September 2019 - 09:31 AM