Using Access 2000 and need help opening report as a PDF using Lebans A2000ReportToPDF which uses this code to open a report in a listbox of a form:
Private Sub cmdReportToPDF_Click()
Dim blRet As Boolean
blRet = ConvertReportToPDF(Me.lstRptName, vbNullString, _
Me.lstRptName.Value & ".pdf", False, True, 150, "", "", 0, 0, 0)
End Sub
But I need to modify this code to open a report from a command button.
Currently code behind command button:
Private Sub cmdDelDocket_Click()
On Error GoTo Err_cmdDelDocket_Click
strDocName = "repDeliveryDocketSingle"
DoCmd.OpenReport strDocName, acViewPreview
Exit_cmdDelDocket_Click:
Exit Sub
Err_cmdDelDocket_Click:
MsgBox Err.Description
Resume Exit_cmdDelDocket_Click
End Sub
I am not that proficient in VB coding yet and would
greatly appreciate any assistance or direction.
Private Sub cmdReportToPDF_Click()
Dim blRet As Boolean
blRet = ConvertReportToPDF(Me.lstRptName, vbNullString, _
Me.lstRptName.Value & ".pdf", False, True, 150, "", "", 0, 0, 0)
End Sub
But I need to modify this code to open a report from a command button.
Currently code behind command button:
Private Sub cmdDelDocket_Click()
On Error GoTo Err_cmdDelDocket_Click
strDocName = "repDeliveryDocketSingle"
DoCmd.OpenReport strDocName, acViewPreview
Exit_cmdDelDocket_Click:
Exit Sub
Err_cmdDelDocket_Click:
MsgBox Err.Description
Resume Exit_cmdDelDocket_Click
End Sub
I am not that proficient in VB coding yet and would
greatly appreciate any assistance or direction.