Print Preview Report from ReportProcess
I am trying to use a list box for reporting (Access2002). I get am getting the list box to populate correctly but can't get the Print or Preview command buttons to do anything.:(
Help!
Private Sub Form_Load()
Dim objAO As AccessObject
Dim objCP As Object
Dim strValues As String
Set objCP = Application.CurrentProject
For Each objAO In objCP.AllReports
strValues = strValues & objAO.Name & ";"
Next objAO
listReports.RowSourceType = "Value List"
listReports.RowSource = strValues
End Sub
Private Sub ProcessReport(intAction As Integer)
If Not IsNull(listReports) Then
DoCmd.OpenReport listReports, intAction
End If
End Sub
Private Sub butPreview_Click()
ProcessReport acPreview
End Sub
Private Sub butPrint_Click()
ProcessReport acNormal
End Sub
|