Report

G

Guest

Scenario.

I have reports generator form, which basically consists of a list box of
reports, and two command buttons, one to open the report in preview mode and
the other to close the reports form. What I am finding is that when I select
a report to open, it also, automatically displays the Print Dialog box, which
I don't want.

Here is my Code that actually runs the report, when the designated button is
clicked.

Private Sub cmdOpenReport_Click()
' Purpose: Opens the report selected in the list box.
On Error GoTo cmdOpenReport_ClickErr
If Not IsNull(Me.QCReports) Then
DoCmd.OpenReport Me.QCReports, IIf(Me.chkPreview.Value, acPreview,
acViewNormal)
End If
Exit Sub

cmdOpenReport_ClickErr:
Select Case Err.Number
Case 2501 'Cancelled by User, or by NoData Event.
MsgBox "Report Cancelled, or no matcing data.", vbInformation,
"Information"
Case Else
MsgBox "Error " & Err & ": " & Error$, vbInformation,
"cmdOpenReport_Click()"
End Select
Resume Next
End Sub
 
G

Guest

Disregard - The "GENIUS" who developed this database actually forgot that he
also created a preview checkbox, which allows the user to preview the report,
when the checkbox is checked. It actually works!..I Tried it!

FYI - The So-called 'GENIUS' in question is Me!

My real problem is in my other post.
 
L

Larry Linson

Disregard - The "GENIUS" who developed
this database actually forgot that he also
created a preview checkbox, which allows
the user to preview the report, when the
checkbox is checked. It actually works!..I Tried it!

FYI - The So-called 'GENIUS' in question is Me!

Yes, it is a scientific fact that there are "geniuses" who have problems
with memory; they are, if I remember correctly, called "humans." :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top