Solved

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

Posted on 2004-09-29
4
706 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

739 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