Solved

Delay a macro until after form is fully loaded and displayed

Posted on 2001-07-25
4
350 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

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…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now