Close form after certain amount of time

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi

How can I make a form close, say 5 seconds after it has loaded. This isnt
for a startup splash screen, but I guess its a similar thing. There will be
no user input, I just want to display it for a chosen length of time, and
then close it.

I am sure this is an easy one, but I am new to access, and so any help or
pointers much appreciated,

Thanks in advance.
 
Set the form's Timer Interval property to 5000.

Use the form's Timer event to run this code:

Private Sub Form_Timer()
Me.TimerInterval = 0
DoCmd.Close acForm, Me.Name, acSaveNo
End Sub
 
Thanks a lot for your help Ken.

Dave


Ken Snell said:
Set the form's Timer Interval property to 5000.

Use the form's Timer event to run this code:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top