I used
Code:
Dim strSql As StringstrSql = "UPDATE tblAreas INNER JOIN tblSchools ON tblAreas.AreasID = tblSchools.AreaID SET tblSchools.CatalogueLabelPrinted = Null " & vbCrLf & _
"WHERE (((tblAreas.CheckToClear)=True));"
Const cstrPrompt As String = _
"Are you sure you want clear the records? Yes/No"
If MsgBox(cstrPrompt, vbQuestion + vbYesNo) = vbNo Then
Cancel = True
ElseIf vbYes Then
DoCmd.RunSQL strSql
Me.Refresh
End If
I even put a refresh when you click the checkboxes.
It works for the first time however press it again and it asks for the wrong numbers to clear. Instead of say 20 it will clear 40.
I think it is doing all schools in area and not by whether catalogue date is clear (not that it matters as they all need to be cleared anyway but I like to have less confusion for the user.)