Solved

Time a form to only show for 5 seconds

Posted on 2012-03-14
4
304 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
ID: 37721631
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
ID: 37721642
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 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37721647
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
ID: 37721691
This is the version I went with.

Sandra
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
type of query 11 42
How do I assign a function with a parameter as the RowSource of a combo box? 9 43
Binding recordsets to a form 6 23
Dcount help 2 12
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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.

770 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