Solved

On timer / Time interval

Posted on 2002-06-17
5
368 Views
Last Modified: 2008-03-06
Anybody has a suggestions of how to make a label, text field, or a subform blink? or stay there for a couple seconds and then dissapear?
I know that we can use On timer and time interval for forms but I have never used it and I just need a sample of how to do this..

I take all the suggestions but I mostly would like to know how to make a label blink.. so it will on and off..

Thank you

0
Comment
Question by:G4B
5 Comments
 
LVL 1

Expert Comment

by:lyners
Comment Utility


Set timer to 1000 (1 second)

Sub OnTimer
     if label.visible = true then
         label.visible = false
     else
         label.visible = true
     end if
end sub


0
 
LVL 1

Expert Comment

by:drivers
Comment Utility
By using lyners code u also can take two same size labels with different colors. place them on each other. So once then u will hv differnt color combo while blinking. I hv done something same with Bulb lightning picture.

just a suggestion
0
 
LVL 4

Accepted Solution

by:
wesleystewart earned 50 total points
Comment Utility
You can shrink it even more:

Set timer to 1000 (1 second)

Sub OnTimer
    label.visible = not label.visible
end sub




0
 

Author Comment

by:G4B
Comment Utility
Thank you for all your help. This worked great!! just they way I wanted. Thank you for all the suggestions I received.

0
 
LVL 4

Expert Comment

by:wesleystewart
Comment Utility
For further thought...

To make the label disappear after blinking for 30 seconds:

Sub OnTimer
static lngTime as integer
    lngTime = lngTime + 1
    if lngTime < 30 then
      label.visible = not label.visible
    else
      label.visible = False
    end if  
end sub

You can do all sorts of stuff with static variables, which retain their value between calls.  

Wes





0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now