Flashing text

coach.32

Registered User.
Local time
Tomorrow, 08:10
Joined
Aug 14, 2011
Messages
28
I have a form with a Date txtbox on it. Is it at all possible to make the txtbox Flash everyweek when it is 'Tuesday'. The reason for this is just a reminder that certain functions have to be performed prior to pressing other access buttons on the menu. Thank-you for any advice.
 
In the Form's On Timer event put;
Code:
Me.YourControl.Visible = Not Me.YourControl.Visible
Set the Timer Interval to say 250 and have a play with various figures till you get a blink rate that you like.

Remember though that this code will not work with a control that has focus. Another approach could be to alternate the Back Colour with the following code in the On Timer event;
Code:
If Me.YourControl.BackColor = 16777215 Then [COLOR="SeaGreen"]'16777215  = White and 255 = Red[/COLOR]
    Me.YourControl.BackColor = 255
Else
    Me.YourControl.BackColor = 16777215
End If
 
If you modify the first code I presented to operate on a Label on your Form, you will avoid the complication of Controls and Focus.

Code:
Me.YourLabel.Visible = Not Me.YourLabel.Visible
 
And remember to turn that flashing of - there is hardly anything more annoying (unless the thing also beeps).
 
Code:
If Me.YourControl.BackColor = 16777215 Then [COLOR=SeaGreen]'16777215  = White and 255 = Red[/COLOR]
    Me.YourControl.BackColor = 255
Else
    Me.YourControl.BackColor = 16777215
End If
... if you go with John Big Booty's second advice (i.e. above), don't forget the colour constants - vbRed, vbWhite. Just fyi.
 
On Tuesday, why not disable all other menu buttons until the Tuesday function is done?

Chris.
 

Users who are viewing this thread

Back
Top Bottom