RE: Make a label "flash" on a form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi, Matthew.

I can't help you understand WHY it's not working, but with the Form's Timer
Interval property set to 3000, the following code in the OnTimer event
procedure worked flawlessly on a test form:

MyLabel.Visible = Not MyLabel.Visible

If you've never created a VBA subroutine before, click on the ellipsis to
the right of the OnTimer event property, and choose Code Builder. Access
will create the shell of a routine for you. Insert the code above between
the Sub and End Sub lines, changing the two instances of "MyLabel" to the
name of your label.

Hope that helps.
Sprinks

"Matthew Reed via AccessMonster.com" wrote:

>
> I have a switchboard that has a label on it that I want to flash on the
> screen, meaning visible for a second, then invisible, visible, etc.
>
> I have a "TestVis" macro that runs on the On Timer property, with the Timer
> Interval set to 3000 (so every 3 seconds).
>
> The TestVis macro should make the label visible if it isn't, then make it
> invisible three seconds later. I'm using a SetValue action to set the
> Visible property of the label to yes or no.
>
> If I set the Visible property of the label to Yesin Design View, then open
> the form, it makes it invisible -- ONCE.
> If I set the Visible property of the label to No, then open the form, it
> makes it visible -- ONCE.
>
> It's as if the property isn't getting saved...Access still thinks it's
> visible if it's not. I tried a Save Form action, no luck.
>
> Any thoughts? I'm missing something about the way control properties can be
> set and tested...
>
>
> --
> Message posted via http://www.accessmonster.com
>
.



Relevant Pages

  • Re: Timer Label Visibility Question
    ... Private Sub cmdLogIn_Click ... turn a wheel in the status bar or in the label. ... Private miCountDown As Long ... There's a Timer on the form which adjusts a count. ...
    (microsoft.public.vb.general.discussion)
  • Re: Timer not working in thread
    ... My application processes a file and updates the data into sql server. ... display the user a labelwith ... The timer won't works when the thread is started, so the label is not ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Multiple Timer Advice
    ... By making the timer move upward, I can then see who has ... >>> Start a new project and place a TextBox, Label, CommandButton and Timer ... >>> Dim OldCaption As String ... >>> Private Sub ColorButton ...
    (microsoft.public.vb.general.discussion)
  • Re: making a form transparent
    ... // this routine is in the Ontimer event of Timer2 ... Label1.Visible:= False; // Turn off the label, ... if yes, then make the label visible, and start the timer. ...
    (alt.comp.lang.borland-delphi)
  • Re: Right syntax for EXPRESSION
    ... "Argusy" wrote: ... Oh, and somewhere appropriate in your code, add a txtSheetno.setfocus if a character is incorrect. ... It mightn't be necessary if you remove the msgbox and put in an invisible label with the message (and a timer to hide it again) ... Somewhere appropriate on your form, add another label, change its text to your warning, change font color to red to make it stand out, and then set its visible property to false ...
    (microsoft.public.vb.general.discussion)