Vb 6.0 执行打印函数时 报错:380 求助 在线等
Dim WithEvents adoQRSdepname1 As RecordsetDim WithEvents adoQRSdep1 As Recordset
Dim WithEvents adoQRSdep2 As Recordset
Dim WithEvents adoQRStelnum1 As Recordset
Dim WithEvents adoQRSsum1 As Recordset
Dim depname As String
Dim telphone As String
Dim ptotal As String
Dim qcnnp As ADODB.Connection
Public Sub PrintContent(Optional PrintDevice As Printer)
ptotal = "金额总计:" + ptotal + "元"
If PrintDevice Is Nothing Then
CurtPrinter1.StartPrint toPreview '预览
Else
CurtPrinter1.StartPrint toPrinter '打印到打印机(调试时在该行报错)
End If
With CurtPrinter1
'重新开始一页,直接打印报表,注意,它会自动换页,如果你设定了标题,它也自动打哦:)
.NewPage
'支持DATEGRID的直接打印,用法同上,不提供例子了
.DirectPrint DataGrid2, ptotal
'结束打印
.EndDoc
End With
End Sub
还有ptotal 的值是这么获取的
qdep1.Text1.Text = CStr(sum1)
ptotal = CStr(sum1) --------------------编程问答-------------------- 这个要看控件了, 是个第三方控件吧? --------------------编程问答-------------------- 不是该打印到传入的PrintDevice上吗
补充:VB , VBA