Why aren't there Application Events for Access?

  • Thread starter Thread starter dch3
  • Start date Start date
D

dch3

Can someone explain to my why MS hasn't add Events for the Application object
(Startup, Exit, etc.) just like the other Office apps? How many times have we
seen a poster asking about running code at Startup or when the Application
shuts down?
 
Running code at startup is there: you can use a macro named AutoExec or
designate a start up form and put code in its Open event.

Running code at shutdown can be accomplished by having a form that's always
open, and putting code in its Close event.

Or are you talking about events to run when Access itself opens, before the
database opens? I can't really see a need for that.
 
I wasn't referring to the workarounds, but rather the fact that Access
doesn't have buildt-in functions like the other Office Apps.

Excel has a variety of events for the Application object including
..WorkbookBeforeClose and .WorkbookOpen. Word has similar events
..DocumentBeforeClose and .DocumentOpen. Outlook has .Startup and .Quit.

While I would love TABLE-level events similar to TRIGGERS in a full-fledged
database, I fully understand that it may not be possible because the actions
are handled by JET and the architecture may not exist for communication
between MSACCESS.EXE and the JET DLL.

But what I don't understand is why MS hasn't built into the .EXE code which
detects when methods like .NewCurrentDatabase, .CloseCurrentDatabase and
..Quit are called - either directly in VBA or via the Toolbar/Ribbon. If the
method is executed, you could certainly fire an associated event.
 
and I forgot one point... you can set a database to compact on close, so
obviously it is possible to detect application level events.
 
Back
Top