Solved

Time a form to only show for 5 seconds

Posted on 2012-03-14
4
266 Views
Last Modified: 2012-03-14
I know there is a timer event, but when the main form opens, I want it to only show for 5 seconds and then kick off a process, but can this be done in the form open event?

Private Sub Form_Open(Cancel As Integer)
    strUserId = VBUserName
       
'STOP HERE FOR FIVE SECONDS BEFORE CALLING THE PROCESS


    Call lblLMRDatabases_Click
End Sub
0
Comment
Question by:ssmith94015
  • 2
4 Comments
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
Set the timer interval to 5000

and add this to the On Timer event

Docmd.close acform, me.name
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
Comment Utility
Actually if you need to start the process after the 5 seconds, place both lines of code in the Timer event, not the Open Event:



    Call lblLMRDatabases_Click
   Docmd.close acform, me.name
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
first you need to add this line in one of your regular modules

option explicit

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)



Private Sub Form_Open(Cancel As Integer)
    strUserId = VBUserName
       
'STOP HERE FOR FIVE SECONDS BEFORE CALLING THE PROCESS

Sleep 5000

    Call lblLMRDatabases_Click
End Su
0
 

Author Closing Comment

by:ssmith94015
Comment Utility
This is the version I went with.

Sandra
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

763 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

9 Experts available now in Live!

Get 1:1 Help Now