如果用水晶报表:Private Sub Command1_Click()
Dim Report As New CrystalReport1
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim Str As String
Dim Serch As String
Serch = Text1.Text
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Str = "select * from output where 购买公司 = '" & Serch & " '"
cn.Open "Provider=Microsoft.Jet.OLEDB.3.51;" & "Persist Security Info=False;" & "Data Source=" & App.Path & "\Sql\database.mdb"
rs.Open Str, cn
Report.Database.SetDataSource rs
Form13.CRViewer1.ReportSource = Report
Form13.CRViewer1.ViewReport
Form13.CRViewer1.ShowFirstPage
Form13.Show
rs.Close
Unload Me
End Sub其实 不管怎样打印只要 把记录集 想办法搞出来就行了