Unanswered: Open Only Reports which have a checkbox checked
I have a split form with a print button this filters the results on if a checkbox is checked. I then need to open an existing reports with only the records showing which have been ticked but I am experencing no error message but the reports opens but opens all records in the report.
Also if I need to put in a msgbox if no textboxes are checked what would it be ?
Option Compare Database
Private Sub Command228_Click()
If Me.Print_Selected_Records = -1 Then
Me.Filter = "([Print Selected Records] = True)"
Me.FilterOn = True
'Else If Me.Print_Selected_Records = 0 Then
'msgbox "Please Select Record to Print"
DoCmd.OpenReport "Car Permit Mail", acViewPreview, "Print Selected Records =" & Me.Print_Selected_Records
Private Sub Command5_Click()
DoCmd.Close , "Select Permits to Print", acSaveNo
Private Sub Form_Load()
Me.FilterOn = False
DoCmd.MoveSize , , 7400, 6000
So, then just create a qry to select all records with Print_Selected_Records = -1 and then use the OnClickEvent of the CheckBox to run it.It of course needs to be an update qry. Hope this helps.
DoCmd.OpenQuery "your querynamehere"