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
tols12Asked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
ooops... cut and paste error

DoCmd.OpenReport strReportName,acViewNormal , , strCriteria
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Do you mean

 DoCmd.OpenReport strReportName,acViewNormal acViewPreview, , strCriteria

?
0
 
tols12Author Commented:
Schweet! That did it. Thanks!!!
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
You are welcome ...

mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.