open db and run code automatically

S

Steven Revell

Hi all,

how do i automatically open a database in access 97 and
execute a sub routine stored in a module?

e.g. in a short cut open the c:\test1.mdb -m update

Thanks in advance for any help,

Steven
 
H

Howard Brody

Any macro named AutoExec will run when the database opens.

Put the subroutine you want to run in a public function (I
usually name it StartUp() or Main()) and then use the
RunCode action in your AutoExec macro to run it.

Hope this helps!

Howard Brody
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top