From the course: Building Solutions Using Excel and Access 2019 Together
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use the AutoExec macro in Access
From the course: Building Solutions Using Excel and Access 2019 Together
Use the AutoExec macro in Access
- [Instructor] Let's talk about the AutoExec macro in Access. The AutoExec macro automatically triggers when a database is opened. All you have to do is save the macro and name it AutoExec with no spaces. You should use the AutoExec when you have routine imports or queries that you run or just when something needs to happen when you first open the database. Let's go put an AutoExec to export out data for us automatically when we open. In your database, you want to go to create and choose macro. And let's go ahead and save it as AutoExec, and then we can click okay. All right, we'll keep it simple. We'll do a message box. This database is full of data that's linked from other sources. Enjoy your new solution. We also want it to go ahead and run our export year-to-date. That way, every time we open the database it actually creates a new copy of our exported data. Let's go ahead and drag that in. All right, perfect. Let's go ahead and save it. And then we can close it. To see the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.