Solved

A pause needed before autoexec macro.

Posted on 2000-03-15
11
378 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
 
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
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.

 

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

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.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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 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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

920 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

18 Experts available now in Live!

Get 1:1 Help Now