![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
Ok. Problem solved |
#4
| |||
| |||
|
|
"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 |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |