I have a master form and a sub-form showing records that meet the required criteria.
On the main form, I have one check-box, and on the sub-form (datasheet view), I have a check-box for each record.
When I click on the check-box on the main form, the status (checked / unchecked) of the check-boxes on the subform changes as well. For this, I use the following code with On Click event:
What I would like to do is to click on any check-box on the sub-form and change the status (checked/unchecked) of all other check-boxes on the sub-form and the main form.
Please advise how I can do that.
On the main form, I have one check-box, and on the sub-form (datasheet view), I have a check-box for each record.
When I click on the check-box on the main form, the status (checked / unchecked) of the check-boxes on the subform changes as well. For this, I use the following code with On Click event:
Code:
Private Sub Selection_Click()
RunCommand acCmdSubdatasheetExpandAll
Dim rs As DAO.Recordset
Set rs = Me.[Subform_name].Form.RecordsetClone
With rs
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
.Edit
![Selection].Value = Me.Selection.Value
.Update
.MoveNext
Wend
.Close
End With
Set rs = Nothing
RunCommand acCmdSubdatasheetCollapseAll
Me.Requery
End Sub
Please advise how I can do that.