Auto_Open Sub for Access

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

Does anyone know how to proceed to write a sub that will
self execute on opening an .mdb file conteining it?? What
I'm trying to reproduce is what's achieved in Excel with
Sub Auto_Open.

Thanks a lot!!
 
There is no AutoOpen event. But...


You can have a form that is set as the start up form. See
Tools, Startup. In the Form's Open event, execute any
code.


Or, you can create a macro and name it AutoExec. This
macro will execute when the database is opened. Use the
RunCode statement to execute any public function.



Chris
 
Back
Top