Solved

A pause needed before autoexec macro.

Posted on 2000-03-15
11
380 Views
Last Modified: 2010-07-27
This is a strange one.
Using a hyperlink from IE5 to an MDB file - it boots twice. I boots normally from Windows Explorer.
I finally tracked the problem down to the autoexec macro. If I remove this then the MDB boots once. All I can figure is that somehow the autoexec is firing off too quickly and causing the MDB to reload.
SO - I would like to get a pause in somehow before the autoexec macro kicks off.
0
Comment
Question by:capital052798
  • 4
  • 2
  • 2
  • +2
11 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 30 total points
ID: 2619562
Hello capital,

Here's one work-around you could try:

Rename Autoexec macro, then define a startup form (choose Tools | Startup..) which will open when database is opened. Set timerinterval of that form to 1000 and execute the renamed macro OnTimer event.

Hope this helps,
Paasky
0
 
LVL 2

Expert Comment

by:mrt1
ID: 2619607
I think you'll get the error whether you use autoexec or Tools/Startup.

This is a bug with IE5 and MS Access....

Have at look at this MS support article:

http://support.microsoft.com/support/kb/articles/Q186/3/08.ASP?LNG=ENG&SA=TECH&FR=1)

I also tried to get around it using Tools/startup and by adding time delays......didn't have any success, though.
0
 
LVL 4

Expert Comment

by:wesleystewart
ID: 2619609
..And then make sure to close the form so the macro doesn't keep executing every 1000 ms... :-)

Wes
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 10

Expert Comment

by:paasky
ID: 2619618
Good addition to my comment Wes! :-)

If you don't want to close startup form you can disable Timer with this code:

  ...
  Me.TimerInterval = 0
End Sub

Paasky
0
 
LVL 1

Expert Comment

by:EvanL
ID: 2619681
Don't know if it helps, but I use this code to pause:

    Dim StartTime As Single
    Dim x As Integer
   
    'Set the time in seconds to pause
    x = 1
   
    'Set the start time variable
    StartTime = Timer + x
   
    'Do events
    Do While Timer < StartTime
        DoEvents
    Loop
0
 

Author Comment

by:capital052798
ID: 2620153
mrt1
I'm sorry to say this but mrt1 is right.
Paasky's suggestion for the startup form was interesting to me as I didn't know it existed - thanks. I set it up, put the timer on, in fact I set the timer up to 10,000 milli secs - but still the same old double boot.
0
 
LVL 1

Expert Comment

by:EvanL
ID: 2620178
The Microsoft solution did not help?
0
 
LVL 2

Expert Comment

by:mrt1
ID: 2620211
The microsoft solution will work, but moving your database onto a web server or creating a "virtual directory" is not always practical or desirable.

I think we're stuck with this Microsoft "feature".

0
 
LVL 10

Expert Comment

by:paasky
ID: 2620722
capital,

I also read the Micro$oft article after sending my suggestion. Thank you mrt1 giving us that information.

It was mentioned there that both Autoexec and startup form will cause multiple start problem. Seems that VBA library is causing trouble with IE3 <

Nasty bug I have to say..

Regards,
Paasky
0
 

Author Comment

by:capital052798
ID: 2622789
Passky
whilst I didn't get my problem solved - you answered my question re the pause on start up - so you get the points. Thanks
0
 
LVL 10

Expert Comment

by:paasky
ID: 2622832
Happy to help with pause issue capital - sorry your loading-twice problem was  not solved. Let's hope MS would offer a patch for this unpleasant feature soon).

Regards,
Paasky
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

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

828 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