PDF generating and saving but returns blank file

deanvilar

Registered User.
Local time
Yesterday, 22:24
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
 
Does the report have any data visible in the Preview?
 
yes there is .. even it's successfully exported to Excel ..
 

Users who are viewing this thread

Back
Top Bottom