Change on checkbox is not reconised when the check is performed by custom function
We have form where checkboxes can be clicked. I this case the record will be added to a list, which will be updated with a save-function. And there is mentioned function to check all check boxes, but this does not behave like when i click an individual checkbox.
code "Select all"
Private Sub Befehl83_Click()
With Me.RecordsetClone
.MoveFirst
Do Until .EOF
.Edit
!visited = True
.update
.MoveNext
Loop
End With
End Sub
clicked on checkbox
Private Sub chkVisited_Click()
If Not visitedList.Contains(Me.Form.Recordset.Fields("trainingMeasureID").Value) Then
visitedList.Add Me.Form.Recordset.Fields("trainingMeasureID").Value
Else
visitedList.Remove Me.Form.Recordset.Fields("trainingMeasureID").Value
End If
End Sub
Currently the state of checkboxes is not saved when used the select-all function. Only when a checkbox is selected individually.
It should save correctly in both cases
Aucun commentaire:
Enregistrer un commentaire