Prev: Pull Data from Recordset
Next: Dynamic Locking
From: Jesse via AccessMonster.com on 25 Feb 2010 12:12 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 fredg wrote: >> 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. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201002/1
From: fredg on 25 Feb 2010 12:30 On Thu, 25 Feb 2010 17:12:09 GMT, Jesse via AccessMonster.com wrote: > 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 > > fredg wrote: >>> 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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
From: Jesse via AccessMonster.com on 25 Feb 2010 13:07
I experimented and got it to do what I wanted. Thank you for your help. fredg wrote: >> 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] >>> >>>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. > -- Message posted via http://www.accessmonster.com |