Solved

Delay a macro until after form is fully loaded and displayed

Posted on 2001-07-25
4
432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

762 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