I use the docmd.openreport
Code:
Dim strReports As String
Select Case Me.cbo_Reports
Case Is = 2 'Event Schedule
strReports = "rpt_Event_Schedule"
Case Is = 1 'Newborns
strReports = "rpt_OB_Deliveries"
Case Is = 3 'Birthday List
strReports = "rpt_Birthday_List"
Case Is = 4 'Birthday Mailing Labels
strReports = "Labels Qry_Birthday_List"
DoCmd.SetWarnings (False)
Case Is = 5 'Event Attendance
strReports = "rpt_Event_Attendance_Report"
Case Is = 6 'Email List
strReports = "rpt_Sr_Prog_Email_List"
Case Is = 7 'Full Mailing Labels
strReports = "rpt_Senior_Programming_Mailing_List"
End Select
' If IsNull(strReports) Or Len(strReports) = "" Then
' MsgBox "No Report Selected", vbCritical, "Report Error"
' Else
DoCmd.OpenReport strReports, acViewPreview
' End If
DoCmd.SetWarnings (True)
This is the code I use for the command button. It works Opens the report and displays it on the screen. The user looks over the report and then clicks on the Printer Icon in the taskbar and sends it to the Printer. Only what's printed is the form not the report. What I'm thinking is that even though the Print Preview of the Report is what's showing on the screen the form must still have the focus what I don't get is why. If a report is sent to the screen in Print Preview mode even in code shouldn't it have the focus it's what is showing on the screen? Why wouldn't it have the focus?