how can show a form for certain time and then close it automatically

how can show a form for certain time and then close it automatically

Post by new.micros » Tue, 23 Dec 2003 13:20:50


how can show a form for certain time and then close it automatically. e.g.
popup a form for 5 seconds and then close by itself
 
 
 

how can show a form for certain time and then close it automatically

Post by Ken Snel » Tue, 23 Dec 2003 14:16:20

Use the OnTimer event of the form. Set the Timer interval to 5000 (for 5
seconds -- the timer interval is in milliseconds). In the form's OnTimer
event, use this code:


VBA Code:
Private Sub Form_Timer()
Me.TimerInterval = 0
DoCmd.Close acForm, Me.Name, acSaveNo
End Sub

or

Macro:
Action: SetValue
Control Name: Forms!FormName.TimerInterval
Expression: 0

Action: Close
Object: Form
Object Name: FormName
Save: No


--
Ken Snell
<MS ACCESS MVP>


--
Ken Snell
<MS ACCESS MVP>