
Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Hi Tony,
Yes, I did that as well. I just did it again to be sure because there is the
issue of the "Visual Basic for Applications project in the database is
corrupt" that keeps comming up. After reading about it, I gather that the
message is eroneous and probably has something to do with the fact that this
is a 2003.
In any case, I used a blank database and decompiled first. I got the same
error message. That proves, I suppose, that the message is eroneous. Then I
Imported all the objects, they I decompiled it, then I compacted it. They I
linked all the tables.
Now its a bit faster to open but still takes about 15 seconds before the
autoexec runs or a display form shows but there are all kinds of the types of
errors that are not obvious and difficult to debug.
So I go back to the original and wonder if I can make that splash screen
come up any sooner somehow.
I gather that there is nothing I can do other than try to figure out what
objects break when the above technique is used to speed it up and why it
really doesn't speed it up enough.
If the application compiles without error and does work well then what kinds
of things can keep it from loading fast and what kinds of things can cause a
decompile to break the objects to the point where they wont work any longer.

Signature
RobGMiller
> >Yes, it did speed it up a bit but it still takes about 15 seconds before
> >either the autoexec runs or the assigned display form comes up.
>
> Ok, now try the decompile on the new MDB. After making a copy of it.
>
> Tony
David W. Fenton - 21 Nov 2007 21:59 GMT
> Now its a bit faster to open but still takes about 15 seconds
> before the autoexec runs or a display form shows but there are all
> kinds of the types of errors that are not obvious and difficult to
> debug.
How do you know it's pausing before running the Autoexec? Maybe it's
running it and it's just taking 15 seconds from the start of the
Autoexec before you see anything onscreen.
Does your Autoexec open any forms bound to tables in your back end?
If so, perhaps the slowdown is there. I don't know if there's any
way to insert a DoEvents in a macro, but perhaps you could move
everything the macro does into code, and put DoEvents after each
step in turn and see if that helps.
I've found that just showing something onscreen makes the startup
*feel* faster, even if the total time is the same.

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
RobGMiller - 22 Nov 2007 15:21 GMT
I've tried listing the unbound splashscreen in the Startup display
form/report and opening it from the autoexec. In both cases they open at
about the same time which is roghly 15 seconds on the development computer.
It does open a bit faster on faster systems but my feeling is that there is
something that it gest stuck on temporarily as it opens.
Ideally, I'd like to determine if it is possible to open the splash screen
before much of the processing that happens as the database opens. Ultimately,
I'd like to get rid of whatever stops it from opening faster.
I know there is something wrong because I've produced other applications
that were much larger in terms of the number of attached tables, queries,
forms and VBA modules without this issue.
I've never had to ask myself this question before but I imagine that Access
would not have to load the entire database file before it displays some of
the application.
The question is, what does it have to load before it has enough code to
display an unbound form?
I've tried using a blank databases, importing the splashscreen and listing
it in the Startup.Display Form/report pulldown. The odd thing is that when I
first create that shell it is 9 megs and 2 megs after it is compacted.
It shows the splash screen a bit faster but still unexpectedly slow at 10
seconds.

Signature
RobGMiller
> > Now its a bit faster to open but still takes about 15 seconds
> > before the autoexec runs or a display form shows but there are all
[quoted text clipped - 13 lines]
> I've found that just showing something onscreen makes the startup
> *feel* faster, even if the total time is the same.
Tony Toews [MVP] - 23 Nov 2007 03:43 GMT
>I've tried listing the unbound splashscreen in the Startup display
>form/report and opening it from the autoexec. In both cases they open at
>about the same time which is roghly 15 seconds on the development computer.
This delay, in my opinion, is caused by the orphaned, compiled code
which a decompile is supposed to clear out. But isn't in your case.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Tony Toews [MVP] - 23 Nov 2007 03:42 GMT
>Yes, I did that as well. I just did it again to be sure because there is the
>issue of the "Visual Basic for Applications project in the database is
[quoted text clipped - 4 lines]
>In any case, I used a blank database and decompiled first. I got the same
>error message. That proves, I suppose, that the message is eroneous.
No, you still haven't been able to decompile the code. And that
orphaned compiled code is what is causing your lengthy 15 second delay
before anything is executed.
>Now its a bit faster to open but still takes about 15 seconds before the
>autoexec runs or a display form shows but there are all kinds of the types of
>errors that are not obvious and difficult to debug.
What kind of errors?
>If the application compiles without error and does work well then what kinds
>of things can keep it from loading fast
The only thing that I know of that causes a delay before the very
first line of your startup code is executed is orphaned, compiled code
which a decompile is supposed to fix. But, in your case, isn't.
>and what kinds of things can cause a
>decompile to break the objects to the point where they wont work any longer.
Now that I don't know. This problem doesn't happen often.
Then I'd suggest the little documented SaveAsText and LoadFromText may
help if an object is corrupted or otherwise behaving weirdly.
At the debug/immediate window type:
Application.SaveAsText acForm,"MyForm","c:\form.txt
You can load the file into a new MDB.
Application.LoadFromText acForm,"MyForm","c:\from.txt"
Sample code at http://www.datastrat.com/Code/DocDatabase.txt for
saving all objects in an MDB.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/