?
Solved

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

Posted on 2004-09-29
4
Medium Priority
?
714 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 1000 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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