Close the form automatically after it open for specific time

L

Lin

Hello,

I have a clock in form. Is there any way I can close the form automatically
after it run for specific time (Like after 30 seconds or so). Please help!

Thank you
 
S

SteveM

Use the OnTimer event.

You can set an Interval (30 secs would be 30000 millisecs) and then in the
OnTimer event place your code to close the form: DoCmd.Close acForm, Me.Name

The OnTimer event will fire when the Interval has expired.

Steve
 
Top