I currently have a button on a form (cmdOpenReport) that opens another form that shows a list of all the students currently in that class. There is a drop down box that the user must select a report to view and a date field that must also be entered. This form displays the students name and a checkbox in the column next to the name. I have a toggle button at the top of the checkbox column that toggles between Select All and Deselect All. I want the user to be able to display the selected report for All or just 1 or a couple of the students selected.
Currently I can view the report for all of the students in that particular class but can't get the checkbox selection to filter the report results further. This is the code that I am using to toggle the selections
Code:
Dim strWhere As String
If Me.SelectReportDropDown = "Health Insurance" And Me.PrintCertificate = True Then
If Me.Dirty Then 'Save any edits
Me.Dirty = False
End If
If Me.NewRecord Then 'Check these is a record to print
MsgBox "Select a record to print..."
Else
strWhere = " ID_LicensingClassSchedule = " & Me.ClassID
DoCmd.OpenReport "CertificateHealth", acViewPreview, , strWhere, , "False"
End If
DoCmd.OpenReport "CertificateHealth", acViewReport
Reports![CertificateHealth]!txtDateCompleted = Forms![LicensingClassStudentsSubformPrintCertificates]!txtDateCompleted
End If
What am I doing wrong?