Access Tutorial 10 Automating Tasks with Macros

Slides:



Advertisements
Similar presentations
1 After completing this lesson, you will be able to: Create a database. Create a table using the Table Wizard. Create and modify a table in Design view.
Advertisements

Using Macros and Visual Basic for Applications (VBA) with Excel
Chapter 5 Multitable Forms
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
Access Lesson 2 Creating a Database
Chapter 1 Databases and Database Objects: An Introduction
Integrating Access with the Web and with Other Programs.
Automating Tasks With Macros
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Access Tutorial 1 Creating a Database
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
Access Tutorial 4 Creating Forms and Reports
Access Tutorial 4 Creating Forms and Reports
Pasewark & Pasewark 1 Access Lesson 4 Creating and Modifying Forms Microsoft Office 2007: Introductory.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Exploring the Basics of Windows XP
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
®® Microsoft Windows 7 Windows Tutorial 1 Exploring the Basics of Microsoft Windows 7.
Chapter 3 Maintaining a Database
Tutorial 6 Using Form Tools and Creating Custom Forms
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
Access Tutorial 2 Building a Database and Defining Table Relationships
Chapter 1 Databases and Database Objects: An Introduction
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
FIRST COURSE Access Tutorial 4 Creating Forms and Reports.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Key Applications Module Lesson 21 — Access Essentials
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
® Microsoft Office 2013 Access Creating a Database.
Microsoft Access 2013 ®® Tutorial 10 Automating Tasks with Macros.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
® Microsoft Office 2010 Exploring the Basics of Microsoft Windows 7.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Creating an Application System Using Macros, Wizards, and the Switchboard.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Advanced Form Design.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
XP New Perspectives on Microsoft Windows XP Tutorial 1 1 Microsoft Windows XP Creating a Web Site Tutorial 1.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Excel Tutorial 8 Developing an Excel Application
Access Tutorial 2 Building a Database and Defining Table Relationships
Using Macros, Switchboards, PivotTables, and PivotCharts
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms
Access Tutorial 4 Creating Forms and Reports
Microsoft Office Access 2003
Microsoft Office Access 2003
Chapter 1 Databases and Database Objects: An Introduction
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships
Tutorial 10 Automating Tasks with Macros
Presentation transcript:

Access Tutorial 10 Automating Tasks with Macros

Objectives Design a switchboard and dialog box for a graphical user interface Run and add actions to macros Single step a macro Create a macro Add a macro to a macro group Add a command button to a form Attach a macro to a command button New Perspectives on Microsoft Office Access 2007

Objectives Create a dialog box form Add a list box to a form Use an SQL statement to fill a list box with object names Create a macro group Use the Switchboard Manager to create a switchboard Modify a switchboard New Perspectives on Microsoft Office Access 2007

Implementing a Graphical User Interface A user interface is what you see and use when you communicate with a computer program A graphical user interface (GUI) (pronounced “gooey”) displays windows, dialog boxes, command buttons, other controls, and graphical pictures, called icons, that you use to communicate with a program A switchboard is a form that appears when you open a database and that provides controlled access to the database’s forms, reports, and queries New Perspectives on Microsoft Office Access 2007

Implementing a Graphical User Interface New Perspectives on Microsoft Office Access 2007

Introduction to Macros A macro is an action, or a set of actions, that you want Access to perform automatically for you New Perspectives on Microsoft Office Access 2007

Directly Running an Existing Macro In the Macro window, click the Run button in the Tools group on the Design tab on the Ribbon Or In the Macro group on the Database Tools tab on the Ribbon, click the Run Macro button, select the macro name in the Macro Name list box in the Run Macro dialog box, and then click the OK button In the Macros group in the Navigation Pane, right-click the macro name, and then click Run on the shortcut menu New Perspectives on Microsoft Office Access 2007

Directly Running an Existing Macro New Perspectives on Microsoft Office Access 2007

Adding Actions to a Macro New Perspectives on Microsoft Office Access 2007

Single Stepping a Macro Single stepping executes a macro one action at a time, pausing between actions In the Macro window, click the Single Step button in the Tools group on the Design tab on the Ribbon Click the Run button in the Tools group on the Design tab on the Ribbon In the Macro Single Step dialog box, click the Step button to execute the next action, click the Halt button to stop the macro, or click the Continue button to execute all remaining actions in the macro and turn off single stepping New Perspectives on Microsoft Office Access 2007

Creating a Macro Click the Create tab on the Ribbon In the Other group on the Create tab, click the Macro button Click the Save button on the Quick Access Toolbar, type the macro name in the Macro Name text box, and then press the Enter key New Perspectives on Microsoft Office Access 2007

Creating an Action by Dragging Make sure the Macro window and the Navigation Pane are open Drag an object from the Navigation Pane to an Action box in the Macro window. Access adds the appropriate macro action and sets its arguments to their default values New Perspectives on Microsoft Office Access 2007

Creating an Action by Dragging New Perspectives on Microsoft Office Access 2007

Creating an Action by Dragging New Perspectives on Microsoft Office Access 2007

Macro Groups A macro group is a macro that contains other macros New Perspectives on Microsoft Office Access 2007

Adding a Macro to a Macro Group Open the macro group in the Macro window. (For a macro group, the Macro Names button is already selected.) Type the macro name in the Macro Name column, select the action in the Action column, type an optional comment in the Comment column, and then use the Action Arguments pane to set the macro’s arguments If the macro consists of more than one action, enter the remaining actions in the rows immediately following the first macro action. Leave the Macro Name column blank for each additional action Save the macro group New Perspectives on Microsoft Office Access 2007

Adding a Macro to a Macro Group New Perspectives on Microsoft Office Access 2007

Adding a Command Button to a Form New Perspectives on Microsoft Office Access 2007

Adding a List Box to a Form Switch to Design view, if necessary If necessary, click the Use Control Wizards button in the Controls group on the Design tab to deselect it Click the List Box tool in the Controls group on the Design tab Position the pointer’s plus symbol where you want to place the upper-left corner of the list box, and then click the mouse button If you use the List Box Wizard, complete the dialog boxes to choose the source of the list, select the fields to appear in the list box, size the columns, select the field that will provide the data for the field in the main form, choose to remember the value for later use or store it in a field, and then enter the value to appear in the list box label If you do not use the List Box Wizard, set the Row Source property and size the list box New Perspectives on Microsoft Office Access 2007

Adding a List Box to a Form New Perspectives on Microsoft Office Access 2007

Using SQL SQL (Structured Query Language) is a standard language used in querying, updating, and managing relational databases Open the query in Datasheet view or Design view Click the SQL View button on the status bar, or right-click the query tab (or title bar) and click SQL View on the shortcut menu, or click the View arrow in the Views group on the Ribbon and click SQL View New Perspectives on Microsoft Office Access 2007

Using SQL New Perspectives on Microsoft Office Access 2007

Adding a Command Button to a Form Using Control Wizards If necessary, click the Use Control Wizards tool in the Controls group on the Design tab so that it is selected Click the Button tool in the Controls group on the Design tab Position the pointer’s plus symbol where you want to place the upper-left corner of the command button, and then click the mouse button Complete the Command Button Wizard dialog boxes to select the action category and the action for the command button, enter the text to display on the command button, select a picture for the button, and then enter a name for the button New Perspectives on Microsoft Office Access 2007

Adding a Command Button to a Form Using Control Wizards New Perspectives on Microsoft Office Access 2007

Creating a Macro Group Click the Create tab on the Ribbon In the Other group on the Create tab, click the Macro button In the Show/Hide group on the Design tab, click the Macro Names button Enter the macros in the macro group by entering each macro name in the Macro Name column and the corresponding action(s) in the Action column. Enter comments as needed in the Comment column, and set arguments as needed in the Action Arguments pane Click the Save button on the Quick Access Toolbar, enter the macro group name in the Macro Name text box, and then click the OK button New Perspectives on Microsoft Office Access 2007

Creating a Macro Group New Perspectives on Microsoft Office Access 2007

Creating a Switchboard To create the switchboard, you’ll use the Access Switchboard Manager The Switchboard Manager also creates a table, named Switchboard Items, which contains records describing the command buttons on the switchboard The Switchboard Manager allows you to create only one Switchboard form for a database, but the switchboard can contain many pages New Perspectives on Microsoft Office Access 2007

Creating a Switchboard New Perspectives on Microsoft Office Access 2007