Unfort I have done everything as instructed and am still having problems.
Expand|Select|Wrap|Line Numbers
- *******************
- Private Sub View_Report_Click()
- Dim blRet As Boolean
- Dim fileName, Report, msg1 As String
- Report = "rptInvoice"
- fileName = "C:\Invoices\PDF Files" & Replace(Date, "/", "") & ".pdf"
- DoCmd.OpenReport Report, acViewPreview
- blRet = ConvertReportToPDF(Report, vbNullString, fileName, False, True, 1, "", "", 0, 0)
- DoCmd.Close acReport, Report
- sbSendreturnform fileName
- End Sub
- *********************
blRet = ConvertReportToPDF(Report, vbNullString, fileName, False, True, 1, "", "", 0, 0)
The name of my report is rptInvoice and I created the folders to put the PDF into.
I changed the Report to View Report got a syntax error. Changed the report name to ReturnsForm as you had it, get byRef error again :(
Where am I going wrong?