What is an Autoexec Access Macro?

This macro will run as the database is opening. You would assign any actions you want done at this time to this macro.

You may for example want to open a particular form and move to a brand new record ready for data entry. This is easily done. You would go into the macro designer and add actions for opening the form and moving to the new record. Then save the macro with the name of 'AutoExec'. Shut down the database and then open it. You should find that the macro kicks into action and you will have moved to a brand new record in the form.

You can put many different macro actions into an Autoexec Access macro. You may wish to take a backup of data at the time the database opens. There is a macro action for transferring data or objects such as tables into another database. You could even create a make table query to backup data and run that in the Autoexec macro. If you do intend to run a delete query as part of a macro then make sure you set the warnings to be false in the macro.

Generally it is better to perform simple tasks in an Autoexec Access macro. If you want to bypass the Autoexec macro then simply hold down your shift key when opening the database. The macro will not run and the database will open as normal.

A good example of a form to open when the macro runs is a login form. This would be the first thing you would want to see when a system loads. You could also minimize the database window at this point.

Load up the macro designer and play around with the different actions. You will be surprised at what you can do.

Let's recap what we've learned in this article:

* An Autoexec Access macro will run when the database is opening
* Opening forms and backing up data are examples of macro actions
* Bypass the Autoexec Access macro by holding down the shift key

Related Posts :

0 Response to "What is an Autoexec Access Macro?"

Post a Comment