Solved

A pause needed before autoexec macro.

Posted on 2000-03-15
11
384 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

717 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