tols12
asked on
How do i open a MS Access 2007 report not in Print Preview?
I just closed a question on how to create a button on a form to print a singe record. That is working perfectly now by printing a report. However, when i click that button, it opens the report in print preview. I added a button to the report that will print it, but becasue the report is opened in print preview, i can't click the button. how do i change the report to open not in print preview so i can click on the print button? here's the coding i am using on the form to open the report:
Private Sub Command286_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "Contact"
strCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Private Sub Command286_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "Contact"
strCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Schweet! That did it. Thanks!!!
You are welcome ...
mx
mx
DoCmd.OpenReport strReportName,acViewNormal acViewPreview, , strCriteria
?