PDF generating and saving but returns blank file (1 Viewer)

deanvilar

Registered User.
Local time
Today, 15:51
Joined
Mar 27, 2013
Messages
63
PDF was generating and saving to the correct location, but when I open the PDF file ... it's blank =P

am using access 2003 and acrobat standard 9

Code:
Private Sub cmdPDFByAssetNo_Click()
Dim MyFilter As String
Dim MyPath As String
Dim MyFilename As String

MyFilter = ""
MyPath = "O:\Onshore Asset Files\01-Asset Master Files\11 - Asset Management System\PDF\"
MyFilename = "Asset_Management_Report_by_Asset_Number.pdf"

DoCmd.OpenReport "rptByAssetNo", acViewPreview
DoCmd.OutputTo acOutputReport, "rptByAssetNo", acFormatPDF, MyPath & MyFilename, True

DoCmd.Close acReport, "rptByAssetNo"

myMessage = "Report generated inside " & MyPath
MsgBox myMessage, vbInformation

End Sub
 

pr2-eugin

Super Moderator
Local time
Today, 23:51
Joined
Nov 30, 2011
Messages
8,494
Does the report have any data visible in the Preview?
 

deanvilar

Registered User.
Local time
Today, 15:51
Joined
Mar 27, 2013
Messages
63
yes there is .. even it's successfully exported to Excel ..
 

Users who are viewing this thread

Top Bottom