dbTalk Databases Forums  

What is the order of events on openeing an AccDe

comp.databases.ms-access comp.databases.ms-access


Discuss What is the order of events on openeing an AccDe in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Phil
 
Posts: n/a

Default What is the order of events on openeing an AccDe - 01-28-2011 , 11:30 AM






I thought that the first thing to happen was the AutoExec macro fired, but
apparently not. I have an Master.AccDb with a reference library to
Menu.AccDe. There is also an AutoExec macro whose first line is a Messagebox
"Auto Exec Running" I create an AccDe from the Master.AccDb and the first
time I open Master.AccDe, everything works as expected. The second and
subsequent times Iopen The AccDe file I get an error that a form in the
referenced database can't be found. After dismissing the error message, the
AutoExec fires correctly and the database then works perfectly.
Can't find a way of getting rid of the error message.
Can't find out where the error message comes from.
Why is there no error message on newly creating the AccDe, but it occurs
subsequently? As usual I hope to live & learn
Phil

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: What is the order of events on openeing an AccDe - 01-29-2011 , 10:44 AM






On 28/01/2011 17:30:02, "Phil" wrote:
Quote:
I thought that the first thing to happen was the AutoExec macro fired, but
apparently not. I have an Master.AccDb with a reference library to
Menu.AccDe. There is also an AutoExec macro whose first line is a
Messagebox "Auto Exec Running" I create an AccDe from the Master.AccDb and
the first time I open Master.AccDe, everything works as expected. The
second and subsequent times Iopen The AccDe file I get an error that a
form in the referenced database can't be found. After dismissing the error
message, the AutoExec fires correctly and the database then works
perfectly. Can't find a way of getting rid of the error message.
Can't find out where the error message comes from.
Why is there no error message on newly creating the AccDe, but it occurs
subsequently? As usual I hope to live & learn
Phil
Ok. Problem solved

Reply With Quote
  #3  
Old   
Access Developer
 
Posts: n/a

Default Re: What is the order of events on openeing an AccDe - 01-29-2011 , 03:18 PM



"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
Ok. Problem solved
Must we all _guess_ at what it was and how you solved it? It might help
someone to know.

Larry Linson
Microsoft Access MVP

Reply With Quote
  #4  
Old   
Phil
 
Posts: n/a

Default Re: What is the order of events on openeing an AccDe - 01-30-2011 , 03:19 AM



On 29/01/2011 21:18:08, "Access Developer" wrote:
Quote:
"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Ok. Problem solved

Must we all _guess_ at what it was and how you solved it? It might help
someone to know.

Larry Linson
Microsoft Access MVP


Sorry Larry.
Somewhere in the code I had the line.
Call ChangeProperty("StartupForm", dbText, Frm.Name), so I had inadvertently
added the StartupForm. (This routine just sets database properties like
starupform, AllowBypassKey etc.)
So first time the program was run, there was no startup form, then it got
loaded with the ChangeProperty function, hence the error on subsequent
openings of the Db. Presumably opening the Startup form occurs before the
AutoExec fires.

Phil

Reply With Quote
  #5  
Old   
Access Developer
 
Posts: n/a

Default Re: What is the order of events on openeing an AccDe - 01-30-2011 , 11:50 AM



Thanks, Phil. Now we know another pitfall to avoid.

Larry Linson
Microsoft Office Access MVP

"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
On 29/01/2011 21:18:08, "Access Developer" wrote:
"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Ok. Problem solved

Must we all _guess_ at what it was and how you solved it? It might help
someone to know.

Larry Linson
Microsoft Access MVP



Sorry Larry.
Somewhere in the code I had the line.
Call ChangeProperty("StartupForm", dbText, Frm.Name), so I had
inadvertently
added the StartupForm. (This routine just sets database properties like
starupform, AllowBypassKey etc.)
So first time the program was run, there was no startup form, then it got
loaded with the ChangeProperty function, hence the error on subsequent
openings of the Db. Presumably opening the Startup form occurs before the
AutoExec fires.

Phil

Reply With Quote
  #6  
Old   
imb
 
Posts: n/a

Default Re: What is the order of events on openeing an AccDe - 01-30-2011 , 02:33 PM



On Jan 30, 10:19*am, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote:
Quote:
On 29/01/2011 21:18:08, "Access Developer" wrote:

"Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote

Ok. Problem solved

Must we all _guess_ at what it was and how you solved it? *It might help
someone to know.

Larry Linson
Microsoft Access MVP

Sorry Larry.
Somewhere in the code I had the line.
Call ChangeProperty("StartupForm", dbText, Frm.Name), so I had inadvertently
added the StartupForm. (This routine just sets database properties like
starupform, AllowBypassKey etc.)
So first time the program was run, there was no startup form, then it got
loaded with the ChangeProperty function, hence the error on subsequent
openings of the Db. Presumably opening the Startup form occurs before the
AutoExec fires.

Phil
Hi Phil,

See Help on StartupForm.

Imb.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.