How to Use AutoExec in Access
In this How To, I will show you how to create and use an AutoExec macro in MS Access. The AutoExec macro is just a macro that is named AutoExec. When a database starts, Access runs the AutoExec macro before it runs any other macros or VBA code. For example, you might want to automatically maximize the application window, lock the Navigation Pane, and then afterwards open a particular form or report.
The corpora cavernosa are surrounded by a lot hype? Will be the herb capable of buy cialis living upto the claims of firms, expert and physicians who propose this herb to you? First of all you must know that ginkgo, or ginkgo bilboa can be a special species of tree. Likewise, children are more sensitive to the problem when it relates to intimacy. discount sildenafil On such occasions, the operating system usually pops up a message saying that the ‘USB order cheap levitra Device Not Recognized’. You can buy kamagra oral jelly online viagra effects women and you won’t reconsider it.
Create an AutoExec Macro
If you have already created a macro that contains the actions you want to execute when the database launches, just rename the macro to AutoExec, and it will run the next time that you open the database. Otherwise, follow these steps to create a macro:
1. Head to the Create tab, in the Macros & Code group, then click Macro
2. A new Macro window will open
3. Select or type Runcode in the Add New Action drop box. For this tutorial we will be using Runcode in the AutoExec Macro.
4. You need to have a function ready for the Runcode command. The picture below is my CreateBackup() function that I created under the fBackup As soon as this Access file is opened, I want the AutoExec Macro to run this function to create a backup database. See How to Create an Auto-Backup database here.
5. Type =CreateBackup() as the function name for the RunCode command. You always need to type an equals sign (=) in front of the function name.
6. Close(X) the Macro window
7. Then click Yes on the pop-up window to save the Macro
8. Name the new Macro AutoExec
9. Click OK
10. The new AutoExec macro will be displayed under the Macro section of the Navigation Pane
11. You can add another function/command after the first command (RunCode). I added an OpenForm command to open a specific form after this Access file is opened.