I have a form that lists a single work request, with an attached
continuous subform that lists specific items that are part of the
request. Each item in the subform has a check box to indicate when the
work is completed, along with a date text box to indicate when the
work was completed. There is also a check box and corresponding date
field in the main form to indicate when the entire request is
completed.
I'm trying to create an event to attach to the check box on the main
form that would check or uncheck all of the items on the subform. The
event that I have so far, however, only updates the first row in the
subform:
Private Sub Completed__Click()
If [Forms]![Main Form]![Completed?] = True Then
[Forms]![Main Form]![Completion Date] = Date
[Forms]![Main Form]![Sub Form].[Form]![Completed?] = True
[Forms]![Main Form]![Sub Form].[Form]![Completion Date] =
Date
Else
[Forms]![Main Form]![Completion Date] = Null
[Forms]![Main Form]![Sub Form].[Form]![Completed?] = False
[Forms]![Main Form]![Sub Form].[Form]![Completion Date] =
Null
End If
End Sub
Can anyone see where I'm going wrong here?
Thanks!