What is Autoexec

G

Guest

Ive been reading many post that talk about autoexec but i cant get to terms
with how it works.

I know you can create a macro called autoexec and run privert functions from
here but how does it work. Do all macros run when the database opens? if i
called a macro startup, would it do the same thing?
 
D

Dirk Goldgar

StuJol said:
Ive been reading many post that talk about autoexec but i cant get to
terms with how it works.

I know you can create a macro called autoexec and run privert
functions from here but how does it work.

Access automatically looks for a macro named "autoexec" when you open
the database. If it finds one -- and if you haven't taken steps to
bypass this startup feature -- it executes the autoexec macro.
Do all macros run when the
database opens? if i called a macro startup, would it do the same
thing?

No. Only the macro named "autoexec" has this special provision.

It's possible, though, to start Access with a command-line argument to
specify a macro to execute. I can't remember whether that macro will
execute in place of the autoexec macro or in addition to it.
 
M

Marshall Barton

Dirk said:
Access automatically looks for a macro named "autoexec" when you open
the database. If it finds one -- and if you haven't taken steps to
bypass this startup feature -- it executes the autoexec macro.


No. Only the macro named "autoexec" has this special provision.

It's possible, though, to start Access with a command-line argument to
specify a macro to execute. I can't remember whether that macro will
execute in place of the autoexec macro or in addition to it.


I just happen to have a test for that scenario ;-)

The StartUp Form, AutoExec and /Xmacro all execute (in that
order) at startup unless the Shift key is held down.

When the Shift key is held down, only the /Xmacro is
executed.
 

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