Hi missinglinq. I must have copied and pasted in an incomplete set of code! Here it is:
Code:
Private Sub Check161_afterupdate()
If Me.Check161 = -1 Then
Me.Ctl5_1 = Now()
Me.Ctl5_1.ForeColor = vbGreen
Else
Me.Ctl5_1 = ""
End If
End Sub
As for the unbound checkboxes, the second batch of code I posted above is what I'm using to automatically check them:
Code:
Private Sub Form_Load()
If IsNull(Ctl5_1) Then
Me.Check161 = 0
Else
Me.Check161 = -1
End If
End Sub
This checks to see if my date field (Ctl5_1) is empty - if so the Checkbox remains unchecked. If not, it checks it automatically. What I am looking for is a function that would do the same for every combination of Checkbox and date field on the form, without me having to create separate code for every single one of them.
Let me know if you know of any way to cycle through the combinations like that. Thanks.