Delay a macro until after form is fully loaded and displayed

I have an opening splash screen that I want to display when the application is first opened then to run a macro. The macro runs 6 different import queries.

No matter what I try only one small corner of the form has time to display before the macro executes. Once the macro is finished then the form fully appears. I want the reverse, the form to fully display (it tells the user to wait, that there is processing goin on) then run the macro.

Any suggestions?
awilson1199Asked:
Who is Participating?
 
PsychoDazeyCommented:
Have you tried putting the macro in the OnCurrent event?
If that doesnt work, in the on current event for the form set the timer = to 2500 (or something like that), I believe the syntax is Me.timer = 2500.
Then, in the on timer event, set the timer = 0 and put the code in to run the macro.
Let me know if you need me to walk you through this.
1
 
mgrattanCommented:
You can execute your macro from the form's On Load event.  

Public Sub Form_Load()
   Me.Repaint
   DoCmd.RunMacro "macro name"
End Sub
0
 
awilson1199Author Commented:
I had tried putting the macro in the OnCurrent, onActive, gotfocus... But I tried the timer solution and it works. Thanks
0
 
PsychoDazeyCommented:
No problem, glad I could help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.