So the checkboxes are bound to a field in the table the form relates to.
The query checks for true values on this field and then appends, adding 1 to the term. Hence adding to the new term.
That's why i need the values changed to false once it has run.
Sorry didnt check the image.
Code:
Private Sub cmdPassToNewTerm_Click()
DoCmd.Save
DoCmd.OpenQuery "qryAddClassesToNewTerm", , acEdit
Dim i As Integer
Dim db As Database
Dim rs As Recordset
Dim ClassNumberOfRecords As Long
Set db = CurrentDb
Set rs = db.OpenRecordSet("tblClasses")
ClassNumberOfRecords = DCount("ClassID", "tblClasses")
rs.MoveLast
rs.MoveFirst
For i = 0 To ClassNumberOfRecords - 1
If rs.Fields("Copy") = True Then
rs.Edit
rs.Fields("Copy") = False
rs.Update
End If
rs.MoveNext
Next I
rs.Close
Set rs = Nothing
db.Close
DoCmd.Save
DoCmd.RefreshRecord
DoCmd.Close
End Sub