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

  • Thread starter Thread starter new.microsoft.com
  • Start date Start date
N

new.microsoft.com

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
 
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
 
Back
Top