Solved

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

Posted on 2004-09-29
4
662 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks jmacmicking,

It works like a charm
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now