Form timer

crisp

Registered User.
Local time
Today, 11:16
Joined
Jan 19, 2004
Messages
23
I’m not sure if this is going to be more of a VBA question but at the moment for me it’s a form thing.

Is there any way i can have a form automatically close and load a different form after an amount of time since it was loaded has passed.

I have a form and i want it to lose after 30 seconds of opening and load the next form.

I’ve had a search around access help but that really wasn’t too successful and I found nothing like it on these forums.

Any help or advice is greatly appreciated. Thanks,
Crisp.
 
While in design mode for the form, in the properties of the form you want to close first and then open a different one, look for Timer Interval and set it to however many seconds you want it to remain open. Please note that 1 second would be entered as 1000 as its interval is milliseconds. So, if you wanted it to be open for 20 seconds, you would enter 20000.

Next, find the On Timer property. you can click on the builder button to open up a macro or form module that you can enter the applicable open macro or code to shut the form and open the other.

So, if you selected Event Procedure (VBA Code), you would have something like this:

Code:
Private Sub Form_Timer()
    DoCmd.Close "NameOfFormIWantToClose"
    DoCmd.OpenForm "NameOfFormIWantOpened", acNormal
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom