Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Time a form to only show for 5 seconds

Posted on 2012-03-14
4
Medium Priority
?
364 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
[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 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

636 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