Probably easiest to do this with an Update query statement.
This kind of thing:
Private Sub chk1_AfterUpdate()
Dim db As DAO.Database
Dim strSql As String
If Me.NewRecord Then
Beep
Else
strSql = "UPDATE [MySubformTable] SET [MyYesNoField] = " &
Me.chk1.Value & ";"
Set db = dbEngine(0)(0)
db.Execute strSql, dbFailOnError
MsgBox db.RecordsAffected & " related record(s) changed."
Me.[NameOfYourSubformControlHere].Form.Requery
End If
End Sub
Presumably you are talking about an unbound check box on the main form: you
should not be trying to store the same thing in the main form's table and in
the subform's table (unless there are valid reasons why they should
sometimes be different from each other).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Mark said:
I have a check box on the main form. Each record on the continuous subform
also has a check box. When I click on the main form check box, I want all
the
records on the subform to update their check boxes. Anyone know if this is
possible?