A
Andrew Glennie
Hi All,
I am wanting to set the value of a checkbox on each line of a subform based
on a value on the main form and a value on the subform. the code I hoped
would work is below. Clearly it doesn't as the checkbox I'm wanting to set is
always set to True irrespective of the value of the other subform checkbox.
Private Sub Form_Current()
If Forms![Events]![EventTypeID].Value = 1 And Forms![Events]![Events
Subform].Form![L2 Attended].Value = True Then
Forms![Events]![Events Subform].Form![Attended].Value = True
ElseIf Forms![Events]![EventTypeID].Value = 2 And Forms![Events]![Events
Subform].Form![L4 Attended].Value = True Then
Forms![Events]![Events Subform].Form![Attended].Value = True
End If
End Sub
So what am I doing wrong? TIA.
Andrew
I am wanting to set the value of a checkbox on each line of a subform based
on a value on the main form and a value on the subform. the code I hoped
would work is below. Clearly it doesn't as the checkbox I'm wanting to set is
always set to True irrespective of the value of the other subform checkbox.
Private Sub Form_Current()
If Forms![Events]![EventTypeID].Value = 1 And Forms![Events]![Events
Subform].Form![L2 Attended].Value = True Then
Forms![Events]![Events Subform].Form![Attended].Value = True
ElseIf Forms![Events]![EventTypeID].Value = 2 And Forms![Events]![Events
Subform].Form![L4 Attended].Value = True Then
Forms![Events]![Events Subform].Form![Attended].Value = True
End If
End Sub
So what am I doing wrong? TIA.
Andrew