Ok, I found this code in a book
################################################## ######
Public mobjAccess As Application
Private Sub cmdPrint_Click()
Dim intCounter As Integer
Dim intPrintOption As Integer
If optPreview.Value = True Then
intPrintOption = acViewPreview
ElseIf optPrint.Value = True Then
intPrintOption = acViewNormal
End If
mobjAccess.Visible = True
For intCounter = 0 To lstReports.ListCount - 1
If lstReports.Selected(intCounter) Then
mobjAccess.DoCmd.OpenReport _
ReportName:=Me.lstReports.List(intCounter), _
View:=intPrintOption
End If
Next intCounter
End Sub
'____________________________________________
Private Sub cmdSelectDatabase_Click()
dlgCommon.Filter = "*.mdb"
dlgCommon.ShowOpen
Me.txtSelectedDB = _
dlgCommon.FileName
Call ListReports
End Sub
'________________________________
Private Sub ListReports()
Dim vntReport As Variant
If mobjAccess Is Nothing Then
Set mobjAccess = New Access.Application
End If
mobjAccess.OpenCurrentDatabase (Me.txtSelectedDB)
lstReports.Clear
For Each vntReport In mobjAccess.CurrentProject.AllReports
lstReports.AddItem vntReport.Name
Next vntReport
End Sub
################################################## ######
Remember that for both ways, the user running this code must have MS Access installed on their computers. I would rather view the report myself before printing it or sending it to a snapshot. You can actually distribute an mde file for reports with your
VB app.
Sal