From the course: Access: Building a Sales Database

Unlock the full course today

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

Creating a macro to display a report that contains a button that runs a query

Creating a macro to display a report that contains a button that runs a query - Microsoft Access Tutorial

From the course: Access: Building a Sales Database

Start my 1-month free trial

Creating a macro to display a report that contains a button that runs a query

- [Instructor] This may sound like a magic trick but it's not, it's just the clever nesting of access objects and macros to create a new level of automation within the database. We're going to create a macro that runs a query and then prompts the user, the person who ran the query to verify that the query results are up to date. Upon confirming that, and answering OK to the message box. A report based on that query is run, then we'll put a button that runs this new macro on a form related to the data related to the data displayed through both through the query and the report. Talk about pulling a rabbit out of a hat. So, let's get started, we're gonna create a query called run recent orders query and report. That's what its' gonna do. So we're gonna go to the Create tab, click Macro, and our first action is to open the query Recent Orders, so and scroll down here to open and choose OpenQuery, choose the query, it's the Recent Orders query and we wanna view it in datasheet mode and we…

Contents