I use an option group on a small navigation form (frmSelectCounselSheetClassroomSwitchboard) as a prompt to open one of the 2 available counseling reports using the following code:
Private Sub cmdOK_Click()
On Error GoTo Err_CommandOK_Click
Select Case Me!fraReportToOpen
Case 1
DoCmd.OpenReport “REPORTWeeklyFirstSchoolCounselSheet”, acViewReport, “”, “”, acNormal
DoCmd.Close acForm, “frmSelectCounselSheetClassroomSwitchboard”
Case 2
DoCmd.OpenReport “REPORTWeeklySecondSchoolCounselSheet”, acViewReport, “”, “”, acNormal
DoCmd.Close acForm, “frmSelectCounselSheetClassroomSwitchboard”
End Select
Exit_CommandOK_Click:
Exit Sub
Err_CommandOK_Click:
MsgBox Err.Description
Resume Exit_CommandOK_Click
End Sub
Both the REPORTWeeklyFirstSchoolCounselSheet and REPORTWeeklySecondSchoolCounselSheet reports are based on separate parameter queries that prompt the User to enter a date for the counsel items for that particular week (just a single date entry).
The code works fine as it is. However, does anyone out there know what code I can use in order to to add a 3rd option to the navigation form’s option group in order to PRINT both reports at once BUT ONLY NEED TO ENTER THE DATE PARAMETER ONCE? (I realize this may involve changing the underlying parameter query for both of the reports).
Access 2007 running on Win7 (32)
Thanks for any assistance you can give me!