From the course: Access 2019: Macros

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Automatically run a macro at startup

Automatically run a macro at startup

From the course: Access 2019: Macros

Start my 1-month free trial

Automatically run a macro at startup

- [Narrator] There is one more way to trigger a macro that you should be aware of, and that's to do so automatically when the database opens. I'm going to make a copy of the Morning Review macro that we've previously created by right-clicking on it and choosing Copy, and then right-clicking in the All Access Objects navigation pane and choosing Paste. That'll allow me to give it a new name here, and I'm going to give it a very special name called autoexec. This is an abbreviation for auto execute. I will press Enter and I will save it here in the navigation pane. Anytime an Access database starts up that includes a macro with this name, it'll run the macro before performing any other tasks. Let's go ahead and close down the database now and test it out. I get this prompt that the clipboard is about to be emptied and that's totally fine. I'll press the Yes button there, and then I'll finish closing out of the database. Then I'll simply start up the database again. The file that I was…

Contents