How do i open a MS Access 2007 report not in Print Preview?

Posted on 2011-10-25
Last Modified: 2012-06-27
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
Question by:tols12
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Do you mean

     DoCmd.OpenReport strReportName,acViewNormal acViewPreview, , strCriteria

    LVL 75

    Accepted Solution

    ooops... cut and paste error

    DoCmd.OpenReport strReportName,acViewNormal , , strCriteria

    Author Closing Comment

    Schweet! That did it. Thanks!!!
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    You are welcome ...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now