Form Open Delay Problem

loo8866

Registered User.
Local time
Yesterday, 18:16
Joined
Jan 11, 2007
Messages
106
Hi, i want a form to load, wait 5 seconds then close. Can anyone tell me what wrong with my code? It seems to have the delay before the form opens? (well, the form doesnt open at all) but if i remove the close form line, there is a delay before the form opens!


Private Sub Form_Open(Cancel As Integer)

Dim PauseTime As Variant, Start As Variant


PauseTime = 5
Start = Timer
Do While Timer < Start + PauseTime

Loop

DoCmd.Close

End Sub
 
What about ON TIMER event.
Look at Access help "On timer", "Timer interval" (properties).
 
Like MStef said use the "On Timer" and "Timer Interval". In "Timer Interval" put in 5000 which is equal to 5 seconds.
For "On Timer" use:
Code:
DoCmd.Close acForm, "Loading", acSaveNo

change "Loading" to your form name.
 

Users who are viewing this thread

Back
Top Bottom