Dim acc As Object Set acc = CreateObject("Access.Application") If Right$(Trim$(App.Path), 1) = "\" Then acc.OpenCurrentDatabase App.Path & "data.mdb" '打开数据库 Else acc.OpenCurrentDatabase App.Path & "\data.mdb" End If acc.docmd.OpenReport "打印准考证" ', acPreview 打印报表“打印准考证” acc.Quit Set acc = Nothing使用ACCESS报表主要缺点就是不能预览[ 查看全文 ]
这个问题在很多论坛里边都有问到。但是一直没找到满意的答案。下边写出一个解决办法 Dim sql As String Dim rstLiuShui As New ADODB.Recordset Dim Rpt As New CRAXDDRT.Report Dim PrintApp As New CRAXDDRT.Application If Option2.Value = True Then sql = "select * from n_ihbill where datediff(d,日期,'" & Format(DTPicker1.Value, "yyyy-MM-dd") & "')=0 and 住院号=" & cbopatient.ItemDa...[ 查看全文 ]