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
 

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

Top