Private Sub Form_Timer()
If Me.Dirty And Me.PrintRecord.ForeColor = 0 Then
Me.PrintRecord.ForeColor = 8404992
Me.Repaint
ElseIf (Me.PrintRecord.ForeColor <> 0) Then
Me.PrintRecord.ForeColor = 0
Me.Repaint
End If
End Sub
(And be sure the Timer value is set, I tried 750 and looked good)
--
\ /
\ Brian Mailloux /
/ \
Quote:
>I'm trying to get a button's ForeColor to change periodically when the
>current record of the form it's in is Dirty. Here's my code thus far:
>Private Sub Form_Timer()
> If Me.Dirty Then 'If record is dirty, blink Print Record btn.
> Me.PrintRecord.ForeColor = _
> IIf(Me.PrintRecord.ForeColor = 0, _
> Me.PrintRecord.ForeColor = 8404992, _
> Me.PrintRecord.ForeColor = 0)
> Me.Repaint
> ElseIf (Me.PrintRecord.ForeColor <> 0) Then
> Me.PrintRecord.ForeColor = 0
> Me.Repaint
> End If
>End Sub
>However, it doesn't work; the color never changes, and debug output
>appears to verify that the .ForeColor property never even changes.
>Am I missing something here?
>--
>joel thornton
>mirage marketing