Oh, that's a brilliant idea! Form2 is a variable, however, so I would need an AutoExec on open instead of using the Options. Well done!
Oh, that's a brilliant idea! Form2 is a variable, however, so I would need an AutoExec on open instead of using the Options. Well done!
OK, you can use VBA in a function within a standard module and call the function from your Autoexec. So, have a Public Function within your Standard Module open the form.
EDIT: Name the standard module something other than the function name. Function names within a macro look like this ...
MyFunctionName()
Good suggestions. Thanks to both of you for your time and persistence.
It is a timing issue with the events.
This works in form 1:
Code:Option Compare Database Option Explicit Private Sub Form_Load() Me.TimerInterval = 100 End Sub Private Sub Form_Timer() DoCmd.OpenForm "Form2" Forms!Form2!text1.SetFocus Me.TimerInterval = 0 End Sub
Didn't think about setting the timer to zero afterwards!