[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

A pause needed before autoexec macro.

Posted on 2000-03-15
11
Medium Priority
?
396 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 90 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

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!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

650 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