XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.

Slides:



Advertisements
Similar presentations
INTRODUCTORY MICROSOFT ACCESS Lesson 1 – Access Basics
Advertisements

1 Microsoft Access 2002 Tutorial 9 – Automating Tasks With Macros.
Tutorial 8: Developing an Excel Application
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
Creating Custom Reports. 2 Design and create a custom report You can easily create custom reports based on a table or query. There are seven sections.
XP New Perspectives on Microsoft Access 2002 Tutorial 61 Microsoft Access 2002 Tutorial 6 – Creating Custom Reports.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
Automating Tasks With Macros
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Using the Visual Basic Editor Visual Basic for Applications 1.
Access Tutorial 4 Creating Forms and Reports
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 1 1 Microsoft Access 2003 Tutorial 1 – Introduction To Microsoft Access 2003.
1 Chapter 1 Tour of Access. 1 Chapter Objectives Start and exit Microsoft Access Open and run an Access application Identify the major elements of the.
Access Tutorial 4 Creating Forms and Reports
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
XP New Perspectives on Microsoft Access 2002 Tutorial 41 Microsoft Access 2002 Tutorial 4 – Creating Forms and Reports.
Tutorial 6 Using Form Tools and Creating Custom Forms
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 1 – Access Basics.
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Microsoft Office 2013 ®® Access Tutorial 4 Creating Forms and Reports.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
FIRST COURSE Access Tutorial 4 Creating Forms and Reports.
Tutorial 4 Creating Forms and Reports
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Key Applications Module Lesson 21 — Access Essentials
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 8 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 8 Creating.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
MS Access: Introduction 1Database Design. MS Access: Overview MS Access A Database Management System (DBMS) designed to create applications that organize,
Microsoft Access 2013 ®® Tutorial 10 Automating Tasks with Macros.
XP Chapter 4 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Collecting Data for Well-Designed Forms Chapter 4 “Making.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Access Lesson 11 Creating and Running Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
Fourth R Inc. 1 WELCOME TO MICROSOFT OFFICE ACCESS 2003 INTERMEDIATE COURSE.
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 11 Using and Writing Visual Basic for Applications Code.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 4 1 Microsoft Office Access 2003 Tutorial 4 – Creating Forms and Reports.
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
Excel Tutorial 8 Developing an Excel Application
Using Macros, Switchboards, PivotTables, and PivotCharts
Microsoft Office Access 2003
Building a User Interface with Forms
Access Tutorial 4 Creating Forms and Reports
Microsoft Office Access 2003
Microsoft Office Access 2003
Microsoft Office Access 2003
Microsoft Office Excel 2003
Tutorial 10 Automating Tasks with Macros
Presentation transcript:

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access. However, often you do not want the user of the database to interact directly with Access; rather, you would provide an interface that removes the user away from the Access interface. A Graphical User Interface (GUI) is a collection of windows, menus, dialog boxes and other graphical components used to communicate with a program. Often, the first view of a custom GUI is a switchboard.

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 3 What is a switchboard? The switchboard is a form that opens when you start the underlying database and is usually used to provide the user with a set of choices. This provides a well-organized interface for the user and eliminates the need for them to interact directly with the database window. This also makes it possible to hide the functionality from the user so that they cannot make changes to the database objects. The form you create for the switchboard is called a dialog box, which asks for user input in the way of a selection.

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 4 An example of a switchboard

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 5 Run and add actions to macros You can create a macro with a series of actions that will repeat these commands whenever it is invoked. An action is an instruction to Access to perform an operation, such as opening a form or displaying a query. You can also automate tasks with Visual Basic for Applications (VBA) but it is easier for a beginner to create macros. With macros, you can simply select the actions you want from a list of actions. Once the macro has been created, you can add actions to it by editing the macro in the Macro window.

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 6 Use the Macro window to add actions It is within the Macro window that you will supply the action name (chosen from a list), any comments you want to make, and the arguments for the action. Arguments are additional facts needed to run the action. Each type of action has its own set of arguments. A commonly used action is the Msgbox action, which will display a message to the user by way of a small form. Another commonly used action is the FindRecord action that will find the first record matching a set of criteria.

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 7 The Macro window

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 8 Single-Stepping a macro When you run a macro, the series of actions are executing one after the other. When you are testing a macro, sometimes it is useful to run the macro one step at a time. This is called single stepping and causes the macro to perform one action, then waits for you to step to the next action. This allows you to gain a clearer view of how the macro is working. When you single step through a macro, Access displays a dialog box called the Macro Single Step dialog box.

XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 9 Use the Macro Single Step dialog box This Macro Single Step dialog box displays details about the next action in the macro. You have three choices as to how you want to respond: –You can step through the macro one step at a time –You can halt the macro –You continue the macro Single-stepping is used to help you determine if you have placed the actions in the right order and whether the actions are working as you expect them to.

XP New Perspectives on Microsoft Office Access 2003 Tutorial The Macro Single Step dialog box

XP New Perspectives on Microsoft Office Access 2003 Tutorial Create a macro Start with a blank macro and then add the actions to it. Drag an action from the database windows into the macro window. Each type of object has a default set of arguments. –For example, if you drag a table into the macro window, the default arguments are to open the table in datasheet view in edit mode. Drag as many objects as you want to the macro window. You can either accept the default arguments or you can edit them to meet your needs. Run the macro and observe the results of the macro.

XP New Perspectives on Microsoft Office Access 2003 Tutorial Actions created by dragging specific objects

XP New Perspectives on Microsoft Office Access 2003 Tutorial Tile windows to improve efficiency

XP New Perspectives on Microsoft Office Access 2003 Tutorial Add a command button to a form On the toolbox, you have a command button tool that allows you to place a command button on a form. You can use the Command Button Wizard to help you place the command button or you can simply place the command button yourself. Click the command button tool on the toolbox, move your mouse to the form and draw a box where you want the command button to appear. The default text on the command button will appear; however, you can change this and other properties on the command button's property sheet.

XP New Perspectives on Microsoft Office Access 2003 Tutorial An Access Form with a command button

XP New Perspectives on Microsoft Office Access 2003 Tutorial Attach a macro to a command button Once you have added a command button to a form, you can attach a macro to it. In most cases you will attach the macro to the command button's OnClick property. Whenever the user clicks on the command button, the attached macro will be executed. To attach the macro to the command button, right click the command button and then click on Properties to display the command button's property sheet.

XP New Perspectives on Microsoft Office Access 2003 Tutorial Modify a macro’s property settings You can change the OnClick property to the name of the macro you want to run when the user clicks the command button. In the property sheet you can change the Caption property, which represents what is printed on the command button. If you prefer to have a picture on the button, you can choose one from the Picture Builder dialog box. For example, if the button will print a record, you might want to add a picture of a printer on the button.

XP New Perspectives on Microsoft Office Access 2003 Tutorial The Picture Builder dialog box

XP New Perspectives on Microsoft Office Access 2003 Tutorial Create a dialog box form A dialog box is actually a form with which the user interacts. You can add many different controls to the form such as command buttons, list boxes, text boxes, labels, etc. To create a dialog box, you begin by adding a blank form. –You will probably want to change some of the form properties before you begin adding controls to the form –To change the text that appears in the form's title bar, enter a new value in the form's caption property –There are several other properties that you might want to set for the form depending on the particular application –Each property can be set on the Property sheet

XP New Perspectives on Microsoft Office Access 2003 Tutorial An example of a dialog box

XP New Perspectives on Microsoft Office Access 2003 Tutorial Dialog box properties, settings, and functions

XP New Perspectives on Microsoft Office Access 2003 Tutorial Add a list box to a form On your dialog box, you might want to offer the user a list of choices. A list box is a control that displays a list of values that a user can brows through. You will usually add a label close to the list box to indicate what is contained in the list box. To add a list box to a form, choose the List Box tool on the toolbox and then move your mouse to the form in the position where you want the list box to appear. Once the list box is on the form, it can be sized and moved around just as you would any other control.

XP New Perspectives on Microsoft Office Access 2003 Tutorial A list box on a form in Design View

XP New Perspectives on Microsoft Office Access 2003 Tutorial Use an SQL statement to fill a list box with object names The standard language for querying, updating, and managing relational databases is SQL (Structured Query Language). Whenever you create a query in Access, Access is creating SQL statements to display datasheets according to the Query specification. If you want to view these SQL statements for a query, you can choose SQL view from the View menu. SQL uses the SELECT statement to specify what data is retrieved from a database and how it presents the data.

XP New Perspectives on Microsoft Office Access 2003 Tutorial Understanding SQL statements Just like any other language, there are rules of the language called syntax. In order to program in SQL you need to learn the rules. However, you can read an SQL statement created by Access and get a pretty good idea of what the statement does. The SQL statements match up with the query specifications; every choice made in the design window is reflected in the SQL statement.

XP New Perspectives on Microsoft Office Access 2003 Tutorial An example of an SQL statement

XP New Perspectives on Microsoft Office Access 2003 Tutorial Use the Switchboard Manager to create a switchboard First, create all the macros you will need for the switchboard and then create the switchboard that will execute the macros. You can use the Switchboard Manager to help you create the switchboard. The Switchboard Manager allows you to specify what buttons should be on the switchboard and identify the command to execute when each of the buttons is clicked.

XP New Perspectives on Microsoft Office Access 2003 Tutorial Switchboard considerations The Switchboard Manager allows you to create only one switchboard for a database; however, the switchboard can contain multiple pages. The main page of the switchboard will display when the switchboard opens. You can place buttons on the main page that will cause other pages in the switchboard to open. The switchboard manager is available on the Database Utilities option on the Tools menu.

XP New Perspectives on Microsoft Office Access 2003 Tutorial An example of a macro group to be used for a switchboard

XP New Perspectives on Microsoft Office Access 2003 Tutorial The Switchboard Manager dialog box

XP New Perspectives on Microsoft Office Access 2003 Tutorial The completed switchboard