Solved

Using the Time Interval property in Access to display several objects on a form?

Posted on 2004-09-29
4
678 Views
Last Modified: 2012-06-21
Hi,

I am trying to display 5 labels on an Access form, separated by a time interval of one second.
I have each of the letters F , L, Y, I, N,G in seprate labels. The VB code in the current event  of the form hide these labels (visible = false). I need to have each of them visible after the form is loaded with a one second time interval between each label.
I tried setting the Time Interval property of the form to 1000, and in the Form_Time event I had each label set to visible = true, but they all show at once. I tried using the Timer with not much luck.
0
Comment
Question by:tariqanis
  • 2
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 12179788
Hello tariqanis,

What happens after all letters are visible?
Do they all stay visible or does it all start again?

Pete
0
 

Author Comment

by:tariqanis
ID: 12179975
Hi Pete,

The letters stay visible... and that's ok, I want them to stay visible, but what I don't want is for them to become visible all at once, I need to have their appearance separated by a one second interval...
0
 
LVL 5

Accepted Solution

by:
jmacmicking earned 250 total points
ID: 12180069
First, create a global counter variable.  Just DIM an integer outside of all other functions for this (I suggest something like DIM CurrentLabel as Integer).  Now, in the Form_Time event put a Select Case statement.  Create one case for each label.  In the case make the label visible and then increment the counter.  Sample code follows.

Labels:
LabelF : Visible = True
LabelL : Visible = False
LabelY : Visible = False
LabelI : Visible = False
LabelN : Visible = False
LabelG : Visible = False

Dim CurrentLabel as Integer

Sub Form_Time
    If CurrentLabel > 4 Then
        Me.TimerInterval = 0
        Exit Sub
    End If

    Select Case CurrentLabel
        Case 4:
            LabelG.Visible = True
            CurrentLabel = CurrentLabel + 1
        Case 3:
            LabelN.Visible = True
            CurrentLabel = CurrentLabel + 1
        Case 2:
            LabelI.Visible = True
            CurrentLabel = CurrentLabel + 1
        Case 1:
            LabelY.Visible = True
            CurrentLabel = CurrentLabel + 1
        Case 0:
            LabelL.Visible = True
            CurrentLabel = CurrentLabel + 1
    End Select
End Sub
0
 

Author Comment

by:tariqanis
ID: 12180504
Thanks jmacmicking,

It works like a charm
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

863 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

26 Experts available now in Live!

Get 1:1 Help Now