VB中打印ACCESS报表

类别:.NET开发 点击:0 评论:0 推荐:

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报表主要缺点就是不能预览

本文地址:http://com.8s8s.com/it/it43273.htm