Results 1 to 10 of 10
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071

    Report Printing Problem

    I have an Access 2010 Database. I use a form to set parameters for a number of reports including a combo box to select which report to print. When the user clicks on the command button the report is generated in Print Preview and when satisfied the user clicks on the print button. The issue is that the report is not printed the form is printed????

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What code do you have behind the "Print Button"?

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Here's the code behind the print button on the form. however the error is after the report opens in print preview The report looks good on screen when I try to send it to the printer the form is sent instead of the report.

    Code:
    Private Sub cmdPrevWorkingListRpt_Click()
        '"Stars Incentives";"Star Measures By PCP Graphs";"Quarterly Stars Incentives for Bianca";
        '"Star Measures Work List By PCP";"QIP Commercial by PCP";"QIP Senior By PCP"
        Dim StrRptname As String
        Select Case Me.cboRpts
            Case Is = "Stars Incentives"
                'Select Case Me.Frame9
                '    Case Is = 1
                '    Case Is = 2
                        StrRptname = "rpt_stars_incentives"
                'End Select
            Case Is = "Star Measures By PCP Graphs"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "rpt_stars_graphing_specific_PCP"
                    Case Is = 2
                        StrRptname = "rpt_stars_graphing2"
                End Select
          
            Case Is = "Quarterly Stars Incentives for Bianca"
                'Select Case Me.Frame9
                '    Case Is = 1
                '    Case Is = 2
                        StrRptname = "rpt_stars_incentives_quarterly for bianca"
                'End Select
    
            Case Is = "Star Measures Work List By PCP"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "Rpt_Star_Measures_Work_List_By_PCP_Revised"
                    Case Is = 2
                        StrRptname = "Rpt_Star_Measures_Work_List_By_PCP_Revised_All"
                End Select
            Case Is = "QIP Commercial by PCP"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "Rpt_QIP-Commercial_By_Specific_PCP"
                    Case Is = 2
                        StrRptname = "rpt_QIP-Commercial_BY_PCP"
                End Select
            Case Is = "QIP Senior By PCP"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "rpt_QIP-Senior_By_Specific_PCP"
                    Case Is = 2
                        StrRptname = "rpt_QIP-Senior_By_PCP"
                End Select
            Case Is = "P4P Pediatric Measures by PCP Graphs"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "rpt_PEDS_graphing_specific_PCP"
                    Case Is = 2
                        StrRptname = "rpt_PEDS_graphing_by_PCP"
                End Select
            Case Is = "P4p Commercial Measures By PCP Graphs"
                Select Case Me.Frame9
                    Case Is = 1
                        StrRptname = "rpt_stars_graphing_Commercial_bypcp"
                    Case Is = 2
                        StrRptname = "rpt_stars_graphing_Commercial"
                End Select
        End Select
        DoCmd.OpenReport StrRptname, acViewPreview
    
    End Sub

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you are talking about a "Print Button" on the Preview?

  5. #5
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    When you run the report in Print Preview The report is displayed on the screen with a row of icons at the top 1 of which is a Printer. there are also options to export the report in several formats including PDF. If I click on the Printer button the form prints not the report even though the report is what is on the screen. If I click on the PDF button the report is sent to a PDF file and displayed on the screen from the Acrobat Viewer.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Hmm...I've got ac2010 and do not see those buttons in Print Preview.

  7. #7
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Here's a screen shot of the toolbar from the Print Preview Screen. You can see the Printer Icon in the top left. However if I click on that button I get a printout of the form Star Measures not the Report.

    Click image for larger version. 

Name:	printpreview.jpg 
Views:	18 
Size:	56.1 KB 
ID:	7516

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Ahh Haa, the ribbon. If you go to File>Print what do you get?

  9. #9
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    That worked got the report as I should have. Still don't understand why the print button on the ribbon doesn't work but don't really care anymore. My issue is resolved.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Obviously the ribbon thinks you are still on the Form. Glad we could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Printing fildered subform datasheet problem
    By dinorbaccess in forum Forms
    Replies: 9
    Last Post: 01-08-2011, 05:15 AM
  2. Label printing problem
    By igiatakis in forum Queries
    Replies: 2
    Last Post: 09-13-2010, 08:27 AM
  3. Problem when printing report
    By bosve73 in forum Reports
    Replies: 13
    Last Post: 08-31-2010, 11:24 PM
  4. Printing problem
    By kulanga in forum Programming
    Replies: 1
    Last Post: 04-14-2010, 06:45 AM
  5. Printing problem
    By lornadobson in forum Reports
    Replies: 2
    Last Post: 09-29-2009, 05:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums