|
本帖最后由 yanwei82123300 于 2013-1-24 16:49 编辑
Private Sub Command56_Click()
On Error GoTo Err_Command56_Click
Dim blRet As Boolean
Me.Refresh
Me.Requery
' Call our convert function
' Please note the last param signals whether to perform
' font embedding or not. I have turned font embedding ON for this example.
blRet = ConvertReportToPDF(Me.lstRptName, vbNullString, _
[Forms]![frmtransforPDFNEW]![MO].Value & ".pdf", False, True, 0, "", "", 0, 0) '导出,打印预览就会有文件名,与窗体匹配
Me.Refresh
Me.Requery
'DoCmd.Minimize
DoCmd.OpenReport "rptMOheaderandDetailNEW", acViewPreview, "", "", acNormal
DoCmd.Close acReport, "rptMOheaderandDetailNEW"
Me.Refresh
Me.Requery
Exit_Command56_Click:
Exit Sub
Err_Command56_Click:
MsgBox Err.Description
Resume Exit_Command56_Click
End Sub
|
|