W
Wayne
Hi
I have 6 check boxes in a form and I want their individual
labels to flash when the corresponding check box is ticked.
I have enterd the following code:
Private Sub Form_Timer()
With Me.SDNoticeOfProgress_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.PDNoticeOfProgress_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.DDNoticeOfProgressMid_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.DDNoticeOfProgressComplete_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.WDNoticeOfProgressMid_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.WDNoticeOfProgressComplete_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
End Sub
Private Sub SDNoticeOfProgress_AfterUpdate()
If Me.SDNoticeOfProgress = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.SDNoticeOfProgress_Label.ForeColor = vbWhite
End If
End Sub
Private Sub PDNoticeOfProgress_AfterUpdate()
If Me.PDNoticeOfProgress = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.PDNoticeOfProgress_Label.ForeColor = vbWhite
End If
End Sub
Private Sub DDNoticeOfProgressMid_AfterUpdate()
If Me.DDNoticeOfProgressMid = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.DDNoticeOfProgressMid_Label.ForeColor = vbWhite
End If
End Sub
Private Sub DDNoticeOfProgressComplete_AfterUpdate()
If Me.DDNoticeOfProgressComplete = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.DDNoticeOfProgressComplete_Label.ForeColor =
vbWhite
End If
End Sub
Private Sub WDNoticeOfProgressMid_AfterUpdate()
If Me.WDNoticeOfProgressMid = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.WDNoticeOfProgressMid_Label.ForeColor = vbWhite
End If
End Sub
Private Sub WDNoticeOfProgressComplete_AfterUpdate()
If Me.WDNoticeOfProgressComplete = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.WDNoticeOfProgressComplete_Label.ForeColor =
vbWhite
End If
End Sub
The problem is that when any of the check boxes are ticked
ALL of the labels flash. I dont know how to fix this.
I also need to put some code in the OnLoad or OnOpen event
of the form I think, to check for ticked check boxes. Is
that right?
I have 6 check boxes in a form and I want their individual
labels to flash when the corresponding check box is ticked.
I have enterd the following code:
Private Sub Form_Timer()
With Me.SDNoticeOfProgress_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.PDNoticeOfProgress_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.DDNoticeOfProgressMid_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.DDNoticeOfProgressComplete_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.WDNoticeOfProgressMid_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
With Me.WDNoticeOfProgressComplete_Label
.ForeColor = (IIf(.ForeColor = vbRed, vbYellow, vbRed))
End With
End Sub
Private Sub SDNoticeOfProgress_AfterUpdate()
If Me.SDNoticeOfProgress = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.SDNoticeOfProgress_Label.ForeColor = vbWhite
End If
End Sub
Private Sub PDNoticeOfProgress_AfterUpdate()
If Me.PDNoticeOfProgress = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.PDNoticeOfProgress_Label.ForeColor = vbWhite
End If
End Sub
Private Sub DDNoticeOfProgressMid_AfterUpdate()
If Me.DDNoticeOfProgressMid = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.DDNoticeOfProgressMid_Label.ForeColor = vbWhite
End If
End Sub
Private Sub DDNoticeOfProgressComplete_AfterUpdate()
If Me.DDNoticeOfProgressComplete = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.DDNoticeOfProgressComplete_Label.ForeColor =
vbWhite
End If
End Sub
Private Sub WDNoticeOfProgressMid_AfterUpdate()
If Me.WDNoticeOfProgressMid = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.WDNoticeOfProgressMid_Label.ForeColor = vbWhite
End If
End Sub
Private Sub WDNoticeOfProgressComplete_AfterUpdate()
If Me.WDNoticeOfProgressComplete = True Then
Me.TimerInterval = 300
Else
Me.TimerInterval = 0
Me.WDNoticeOfProgressComplete_Label.ForeColor =
vbWhite
End If
End Sub
The problem is that when any of the check boxes are ticked
ALL of the labels flash. I dont know how to fix this.
I also need to put some code in the OnLoad or OnOpen event
of the form I think, to check for ticked check boxes. Is
that right?