I have a form where I have added a blinking effect to label1. Here is the code, and the code works fine:
Private Sub Form_Timer()
With Me.Label1
.ForeColor = (IIf(.ForeColor = vbBlue, vbBlack, vbBlue))
End With
End Sub
-------------------
Private Sub Form_Current()
Me.TimerInterval = 1000
End Sub
------------------
That above code allows for two colors to alternate. But, why can't more colors be allowed to alternate at one time? Next is the code that I successfully used in Visual Basic 6 that gives all colors possible:
Private Sub Timer1_Timer()
Label2.ForeColor = Val(Label2.ForeColor) + 1000
End Sub
-------------------
So my question is, what would the code be that would work in Access to allow the 1000 colors? The Visual Basic code above does not work in Access.
Thank You.
Private Sub Form_Timer()
With Me.Label1
.ForeColor = (IIf(.ForeColor = vbBlue, vbBlack, vbBlue))
End With
End Sub
-------------------
Private Sub Form_Current()
Me.TimerInterval = 1000
End Sub
------------------
That above code allows for two colors to alternate. But, why can't more colors be allowed to alternate at one time? Next is the code that I successfully used in Visual Basic 6 that gives all colors possible:
Private Sub Timer1_Timer()
Label2.ForeColor = Val(Label2.ForeColor) + 1000
End Sub
-------------------
So my question is, what would the code be that would work in Access to allow the 1000 colors? The Visual Basic code above does not work in Access.
Thank You.