Solved

Delay a macro until after form is fully loaded and displayed

Posted on 2001-07-25
4
394 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:awilson1199
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
PsychoDazey earned 100 total points
ID: 6318167
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
 
LVL 14

Expert Comment

by:mgrattan
ID: 6318176
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
 

Author Comment

by:awilson1199
ID: 6318191
I had tried putting the macro in the OnCurrent, onActive, gotfocus... But I tried the timer solution and it works. Thanks
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6318230
No problem, glad I could help!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question