autoexec help please

Zaeed

Registered Annoyance
Local time
Tomorrow, 10:17
Joined
Dec 12, 2007
Messages
383
Hi, I have my db launch my main login form on startup, which I have set through the Tools menu. I also have an autoexec macro which does two things.
1) refreshes the links to the backend
2) check if the FE is the current version

My issue is that the autoexec takes a few seconds to load, so there is a delay when you start the db.
What I am trying to do is modify the autoexec to open a small form that says Loading, then do the two above tasks, then open my login form.

I have encountered a problem with this. When I set the form to open from the macro, the form goes spastic. For starters it's subform loads the wrong form, and secondly, none of the controls work. And to top it off, if I was to then click the close button (red cross), Access has a hissy fit on me and can only be closed by ctrl-alt-delete.

Anyone know what i'm doing wrong?
 
Zaeed,

Here are my thoughts on this:

1) Drop the "initializing" form completely. Do not set the tools options to open any form on startup.
2) Create a very simple form with one word on it: Loading
3) Write that word in a label or something, and follow it with three "periods" (these will be used to indicate the program "loading".
4) In the AutoExec macro, open that form, then, on the form's 1 second (or however many fractions of seconds you want) timer event, start two processes: **First process: A loop that shows 1 period, 2 periods, 3 periods (then repeat), after the "loading" word on the form. **Second process: Whatever code you are talking about here.

At the end of the "long procedure", stop the "period" loop in the form's module. Don't forget to start the hourglass though! (You may want to use that too, it's a good indicator not to touch anything!) :)

My timeclock example goes through this process I am talking about. You may want to have a look...
 
Last edited:
as always Adam, thankyou
 
one thing you can do is not bother refreshing the links, if the tables appear to be properly connected. eg compare the actual connection of 1 table with the expected/required connection. That will save you a lot of startuptime anyway
 
Ill look into that gemma.

However i'm still experiencing my initial problem where the form goes stupid, controls don't work and access locks up. Anyone know why this would be happening?
 
I think i've just fixed it by including a StopMacro at the end of my autoexec macro.
 
Zaeed, were you not able to solve the initial problem?

Are you using A07? That version completely sucks. I use it, and the "memory stall" crap happens all the time, but it has never crashed on me because of it. Just takes a few extra seconds of my day away. :rolleyes:
 
im using '03
I think i've fixed the problem by including StopMacro after the code executions. Im assuming the macro kept running for some reason and it was perhaps looping somewhere. weird that it only happened when i included the OpenForm function on the macro.

It seems to work now though.
 

Users who are viewing this thread

Back
Top Bottom