Flashing Label

  • Thread starter Jesse via AccessMonster.com
  • Start date
J

Jesse via AccessMonster.com

Hi,
I would like to make a label flash to remind the user to complete an
action. I know that it’s annoying and that it isn’t good for epilepsy people.
All of that aside I would like to have it flash when the on focus is on a
text box then when its off focus the flashing stops. Can someone please help
me accomplish this. Any help would be appreciative thanks.
 
F

fredg

Hi,
I would like to make a label flash to remind the user to complete an
action. I know that it¢s annoying and that it isn¢t good for epilepsy people.
All of that aside I would like to have it flash when the on focus is on a
text box then when its off focus the flashing stops. Can someone please help
me accomplish this. Any help would be appreciative thanks.

Let's say you wish the form's Date control to flash when the FirstName
control is entered.

Set the Form's Timer Interval property to 0

Code the Form's Timer event:
If [DateControl].BackColor = vbWhite Then
[DateControl].BackColor = vbRed
[DateControl].ForeColor = vbYellow
Else
[DateControl].BackColor = vbWhite
[DateControl].ForeColor = vbBlack
End If

Code the [FirstName] control's GotFocus event

Me.TimerInterval = 1000
Form_Timer

Code the LostFocus event of that same [FirstName] control:
Me.TimerInterval = 0
Me.ControlName.BackColor = vbWhite
Me.ControlName.ForeColor = vbBlack

Use very sparingly as it becomes annoying very quickly..

Change the control name and the colors as needed.
 
J

Jeff Boyce

Jesse

Given that you realize the annoyance and personal health risk, why do you
feel that this is the only way to get the user's attention?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

Jesse via AccessMonster.com

I know this isn’t the only way to get the users attention. All I want it to
do is have a level flash that say Press Enter when they place the focus on a
text box that is for a date. Then when they enter the date and press enter I
want to label to stop flashing and be visible = false. I know there are other
methods I could use but I would like to use this idea.

Jeff said:
Jesse

Given that you realize the annoyance and personal health risk, why do you
feel that this is the only way to get the user's attention?

Regards

Jeff Boyce
Microsoft Access MVP
Hi,
I would like to make a label flash to remind the user to complete an
[quoted text clipped - 4 lines]
help
me accomplish this. Any help would be appreciative thanks.
 
J

Jeff Boyce

Thanks for the clarification...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Jesse via AccessMonster.com said:
I know this isn't the only way to get the users attention. All I want it to
do is have a level flash that say Press Enter when they place the focus on
a
text box that is for a date. Then when they enter the date and press enter
I
want to label to stop flashing and be visible = false. I know there are
other
methods I could use but I would like to use this idea.

Jeff said:
Jesse

Given that you realize the annoyance and personal health risk, why do you
feel that this is the only way to get the user's attention?

Regards

Jeff Boyce
Microsoft Access MVP
Hi,
I would like to make a label flash to remind the user to complete
an
[quoted text clipped - 4 lines]
help
me accomplish this. Any help would be appreciative thanks.
 
J

Jesse via AccessMonster.com

Fredg - This code will work but I was more interested in making the label
appear and then disappear every half second. I would be grateful with any
insight you have on accomplishing this. Thanks
Hi,
I would like to make a label flash to remind the user to complete an
action. I know that itʼs annoying and that it isnʼt good for epilepsy people.
All of that aside I would like to have it flash when the on focus is on a
text box then when its off focus the flashing stops. Can someone please help
me accomplish this. Any help would be appreciative thanks.

Let's say you wish the form's Date control to flash when the FirstName
control is entered.

Set the Form's Timer Interval property to 0

Code the Form's Timer event:
If [DateControl].BackColor = vbWhite Then
[DateControl].BackColor = vbRed
[DateControl].ForeColor = vbYellow
Else
[DateControl].BackColor = vbWhite
[DateControl].ForeColor = vbBlack
End If

Code the [FirstName] control's GotFocus event

Me.TimerInterval = 1000
Form_Timer

Code the LostFocus event of that same [FirstName] control:
Me.TimerInterval = 0
Me.ControlName.BackColor = vbWhite
Me.ControlName.ForeColor = vbBlack

Use very sparingly as it becomes annoying very quickly..

Change the control name and the colors as needed.
 
F

fredg

Fredg - This code will work but I was more interested in making the label
appear and then disappear every half second. I would be grateful with any
insight you have on accomplishing this. Thanks
Hi,
I would like to make a label flash to remind the user to complete an
action. I know that itʼs annoying and that it isnʼt good for epilepsy people.
All of that aside I would like to have it flash when the on focus is on a
text box then when its off focus the flashing stops. Can someone please help
me accomplish this. Any help would be appreciative thanks.

Let's say you wish the form's Date control to flash when the FirstName
control is entered.

Set the Form's Timer Interval property to 0

Code the Form's Timer event:
If [DateControl].BackColor = vbWhite Then
[DateControl].BackColor = vbRed
[DateControl].ForeColor = vbYellow
Else
[DateControl].BackColor = vbWhite
[DateControl].ForeColor = vbBlack
End If

Code the [FirstName] control's GotFocus event

Me.TimerInterval = 1000
Form_Timer

Code the LostFocus event of that same [FirstName] control:
Me.TimerInterval = 0
Me.ControlName.BackColor = vbWhite
Me.ControlName.ForeColor = vbBlack

Use very sparingly as it becomes annoying very quickly..

Change the control name and the colors as needed.

You're allowed to experiment.
Simply set the timer interval to 500 (instead of 1000) and change the
name of the control to whatever the label control's name is.
 
J

Jesse via AccessMonster.com

I experimented and got it to do what I wanted. Thank you for your help.
Fredg - This code will work but I was more interested in making the label
appear and then disappear every half second. I would be grateful with any
[quoted text clipped - 34 lines]
You're allowed to experiment.
Simply set the timer interval to 500 (instead of 1000) and change the
name of the control to whatever the label control's name is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top