T
Ted
I have created a form with a slew of checkboxes and have written some VBA so
that when the box is checked the color of the associated label's changes
along with the foreground text's. I note that the value of the checkbox's can
be controlled by the user's either clicking the checkbox control or the
associated label control. There is however one 'rogue' checkbox on this same
form whose label can not be used like the others'. I attach the relevant code
but it seems not to be materially different from the code used to govern the
other checkboxes.
Private Sub Complete_AfterUpdate()
If Me.Complete = -1 Then
Me![Label59].BackColor = vbGreen
Me![Label59].ForeColor = vbBlack
Me![Label59].Caption = "Form is Complete"
End If
If Me.Complete = 0 Then
Me![Label59].BackColor = vbRed
Me![Label59].ForeColor = vbYellow
Me![Label59].Caption = "Form is Incomplete"
End If
End Sub
Private Sub Form_Current()
........ denotes other code above the following
If Me.Complete = -1 Then
Me![Label59].BackColor = vbGreen
Me![Label59].ForeColor = vbBlack
Me![Label59].Caption = "Form is Complete"
End If
If Me.Complete = 0 Then
Me![Label59].BackColor = vbRed
Me![Label59].ForeColor = vbYellow
Me![Label59].Caption = "Form is Incomplete"
End If
..... denotes other code below the above
End Sub
Any thoughts?
that when the box is checked the color of the associated label's changes
along with the foreground text's. I note that the value of the checkbox's can
be controlled by the user's either clicking the checkbox control or the
associated label control. There is however one 'rogue' checkbox on this same
form whose label can not be used like the others'. I attach the relevant code
but it seems not to be materially different from the code used to govern the
other checkboxes.
Private Sub Complete_AfterUpdate()
If Me.Complete = -1 Then
Me![Label59].BackColor = vbGreen
Me![Label59].ForeColor = vbBlack
Me![Label59].Caption = "Form is Complete"
End If
If Me.Complete = 0 Then
Me![Label59].BackColor = vbRed
Me![Label59].ForeColor = vbYellow
Me![Label59].Caption = "Form is Incomplete"
End If
End Sub
Private Sub Form_Current()
........ denotes other code above the following
If Me.Complete = -1 Then
Me![Label59].BackColor = vbGreen
Me![Label59].ForeColor = vbBlack
Me![Label59].Caption = "Form is Complete"
End If
If Me.Complete = 0 Then
Me![Label59].BackColor = vbRed
Me![Label59].ForeColor = vbYellow
Me![Label59].Caption = "Form is Incomplete"
End If
..... denotes other code below the above
End Sub
Any thoughts?