SlideShare una empresa de Scribd logo
1 de 60
Automating Database Processing Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  1 Chapter 6 “An organization’s ability to learn, and translate that learninginto action rapidly, is the ultimate competitive advantage.”—Jack Welch
Chapter Introduction Design and implement user-friendly menu Called switchboard Macros Automate repetitive tasks Conditions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  2
Tools Covered in This Chapter AutoExec macro AutoKeys macro Macro window Startup dialog box Switchboard Manager Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  3
Level 1 Objectives: Automating Tasks with Switchboards and Macros Create a well-designed switchboard to provide a user interface for a database Automate tasks by creating basic macros Specify what happens when a database opens Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  4
Understanding Switchboards Switchboard  Special kind of form  Appears when database opened Lists options for working with database objects Select up to eight objects to list on switchboard Determine what action Access should take when users select option Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  5
Understanding Switchboards (continued) Typical switchboard buttons Open forms reports and other objects  Open other switchboards that list additional database objects  Close switchboard Open the Navigation Pane Close Access Main switchboard Large number of database objects Launches other switchboards Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  6
Typical Switchboard Design Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  7
Designing a Switchboard Switchboard Manager Tool to design and customize switchboard Create main switchboard Add buttons Specify button properties Access creates switchboard form Only one switchboard per database Can contain many pages Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  8
Creating a Switchboard  Open Switchboard Manager Switchboard Manager dialog box Use five buttons on Switchboard Manager dialog box to perform tasks Create secondary switchboards first Verify new form creation Switchboard item table  Keeps track of switchboard items commands and arguments  Should be altered only through Switchboard Manager Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  9
Switchboard Manager Buttons Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  10
Edit Switchboard Item Dialog Box Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  11
Switchboard Commands Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  12
Formatting a Switchboard By default Access switchboards share same layout and design  Including background colors and placement of title Switchboard Manager doesn’t provide options for modifying switchboard design Format switchboard in form design view Do not change command buttons or properties Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  13
Understanding Basic Macros Macro  Action or series of actions  Save time and ensure accuracy Usually assigned to key, key combination, or button Composed of series of actions organized in sequence in which they should be performed Create macro Using Macro window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  14
Common Macro Actions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  15
Creating a Macro Create Access macro in Macro window Select the Create tab, and then click the Macro button in the Other group Action column  List actions macro performs Click list arrow in action column Access provides over 50 different actions Comment column Document action by describing what task it performs Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  16
Creating a Macro (continued) Action arguments pane Provide additional information for performing macro action Arguments needed vary depending on selected action chosen Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  17
Running a Macro In Macro window  Click the Run button in the Design tab Click Run Macro on the Database Tools Ribbon, click the list arrow and select the macro, and then click OK In the Navigation Pane, click Macros, right-click the macro name, and then click Run Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  18
Macro Design Toolbar Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  19
Editing a Macro Use Macro window Rearrange order of actions  Drag action line to new position Insert new action between two existing actions  Right-click row  Click insert rows Delete action Right-click row  Click delete rows Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  20
Setting Startup Options Startup options Access performs when database opens Use Startup dialog box Bypass Startup Options Press and hold down shift key when opening database Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  21
Specifying Startup Options in the Startup Dialog Box Options Display form Display navigation pane Allow full menus Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  22
Startup Dialog Box Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  23
Creating a Splash Screen Splash screen Displays when database opens Contains Logo Text Can only display splash screen or switchboard automatically Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  24
Creating a Splash Screen (continued) AutoExec Special macro Runs when database opens Before startup dialog box options Can use to display splash screen Create splash screen form Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  25
Creating an AutoExec Macro Create macro that contains actions Access should perform when database opened Save macro using name AutoExec Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  26
Level 1 Summary Switchboard  Special kind of form  Appears when database opened Macro Use to automate repeated actions Startup options dialog box Splash screen Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  27
Level 2 Objectives:Creating Advanced Macros Consolidate automated tasks by creating a macro group Create buttons that can perform a series of actions Troubleshoot macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  28
Understanding Macro Groups Macro group  Two or more macros placed within same macro file Consolidate related macros  Manage large numbers of macros Only group name displayed as macro object in database window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  29
Creating a Macro Group Logical to organize similar macros within group To create Click the Create tab and then click the Macro button Click the Macro Names button on the Design tab. Access adds the Macro Name column to the left of the Action column In the Macro Name column, enter the name of a macro In the Action column, enter the corresponding actions for the macro Enter comments as needed in the Comment column, and set arguments as needed in the Action Arguments pane Save the macro group, using the “mcr” prefix in the object name Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  30
Running the Macros in a Macro Group Run particular macro within group Click the Run Macro button in the Macro group on the Database Tools Ribbon Select the list arrow to choose the macro name Click the macro name Click OK Switchboard Manager and many property sheets Specify name of macro to run Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  31
Running the Macros in a Macro Group Run macro object Enter or select name Run only one macro in macro group Use special notation mcrGroupName.mcrMacroName Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  32
Creating an AutoKeys Macro Group AutoKeys macro group  Assign macro action or set of actions to key or key combination Macro name column Type key or key combination  Use special syntax SendKeys action  Sends keystrokes to Access or to another active program Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  33
Examples of Key Combinations for the Autokeys Macro Group Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  34
Modifying the Switchboard to Run Macros Modify switchboard to include  Macro group listing macros that open queries Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  35
Specifying Conditions and Events for Macros Specify conditions for performing macro actions  Assign macro to control Event-driven programming Running macro when user interacts with object Event  State condition or occurrence that Access recognizes Event property Specifies how object responds when event occurs Set to macro name to run macro when even occurs Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  36
Assigning a Macro to a Control Create macro or macro group that performs series of actions Assign macro to control Add command button to form by opening form in Design view Attach macro with desired actions to command button Using On Click property Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  37
Specifying Conditions in a Macro Where condition argument Refer to controls on form that are not currently active Use control’s complete name Format [Forms]![formName]![controlName] Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  38
Troubleshooting Macros Macros containing arguments Especially error prone Error types Syntax error Logic error Run-time error Troubleshooting tools Single step through execution of macro, using debug window Print macro code Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  39
Printing Macros Open Documenter dialog box  Select macro Click options button to select details of macro to print Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  40
Single Stepping a Macro Runs macro one action at time  Pausing between actions Make sure actions appear in correct order and with correct arguments Use Single Step button Macro Single Step dialog box Buttons Step Halt Continue Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  41
Using Breakpoints and the Debug Window Breakpoint Code inserted in macro Signals where to stop macro Examine values of actions controls, and arguments macro using in debug window Debug window  Shows macro as it appears in VBA code Examine details of macro code in debug window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  42
Using Breakpoints and the Debug Window (continued) Immediate pane Displays current value of controls and arguments Display using ? operator Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  43
Level 2 Summary Macro group Conditions for macros Assign macro to control Debug macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  44
Level 3 Objectives:Macro Conditions Display message boxes under specified conditions Run a macro when a form opens or a report prints Use a macro to validate data Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  45
Exploring Macro Conditions Macro conditions  Logical expressions that result in true or false answer Depending on outcome  Macro can perform one set of actions or another Enter macro conditions  Open condition column in Macro window By clicking Conditions button If condition true  Access performs corresponding action in action column Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  46
Exploring Macro Conditions Perform more than one action if condition true  Enter conditional statement in condition column  Select actions in action column in order  Enter ellipsis (…) for each subsequent action associated with condition in condition column Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  47
Exploring Macro Conditions (continued) SetValue action Change property of object by disabling, updating, hiding, or displaying control Arguments  Item Expression Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  48
Assigning a Macro to an Object Event Assign macro to object  By specifying macro name in event property of object Event categories Report Section Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  49
Report Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  50
Report Section Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  51
Using Message Boxes with Forms Form events can also trigger macros Use to  Validate data  Set values  Navigate between forms Filter, find, and print records Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  52
Form Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  53
Using Message Boxes with Forms MsgBox command Opens message box  Displays warning or informational message MsgBox ("message" sum of button and icon values "title") Returns value depending on which button clicked Create condition that checks to see which button users click Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  54
Using Message Boxes with Reports When conditions in macro references name of control from source  Source must be open when condition tested Can hide window while macro tests condition MsgBox action Opens message box and displays warning or informational message Similar to using MsgBox command Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  55
Using Message Boxes with Reports (continued) MsgBox action arguments  Message  Beep  Type Title Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  56
Validating Data with Macros Validation field properties have limits Validate data using more than one rule and more than one validation message Create macro Domain aggregate functions Calculate statistics for set of records (recordset) or domain, from table or query Dcount function Dcount(expression, table or query, condition) Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  57
Common Domain Aggregate Functions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  58
Level 3 Summary Conditional expressions in macros Assign macros to events Message boxes Msgbox command Msgbox action Validate data with macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  59
Chapter Summary Switchboard Provides main menu for Access application Macro  Automates repetitive tasks Can use conditional expressions Associate with command buttons or other controls Debugger Find errors in macros by stepping though each statement Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach  60

Más contenido relacionado

La actualidad más candente

Sample sales reengineering in obiee 11g part i and part ii
Sample sales reengineering in obiee 11g  part i and part iiSample sales reengineering in obiee 11g  part i and part ii
Sample sales reengineering in obiee 11g part i and part iiAmit Sharma
 
Access lesson05
Access lesson05Access lesson05
Access lesson05Aram SE
 
PowerPoint Unit A
PowerPoint Unit APowerPoint Unit A
PowerPoint Unit Ajarana00
 
Access 2013 Unit B
Access 2013 Unit BAccess 2013 Unit B
Access 2013 Unit Bjarana00
 
Excel 2013 Unit A
Excel 2013 Unit AExcel 2013 Unit A
Excel 2013 Unit Ajarana00
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAram SE
 
Fomatting Text Tips
Fomatting Text TipsFomatting Text Tips
Fomatting Text TipsEMAINT
 
Microsoft excel 2013 Quickstart
Microsoft excel 2013 QuickstartMicrosoft excel 2013 Quickstart
Microsoft excel 2013 Quickstartcomatsg
 
Unit C - CSCI 64
Unit C - CSCI 64Unit C - CSCI 64
Unit C - CSCI 64dpd
 
Excel 2013 Unit C
Excel 2013 Unit CExcel 2013 Unit C
Excel 2013 Unit Cjarana00
 
TimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionTimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionPeter Kalmstrom
 
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...Little Logic
 
Document Generation in Dynamics CRM 2016
Document Generation in Dynamics CRM 2016Document Generation in Dynamics CRM 2016
Document Generation in Dynamics CRM 2016Pankaj Shukla
 

La actualidad más candente (18)

Power Point Unit C
Power Point Unit CPower Point Unit C
Power Point Unit C
 
Sample sales reengineering in obiee 11g part i and part ii
Sample sales reengineering in obiee 11g  part i and part iiSample sales reengineering in obiee 11g  part i and part ii
Sample sales reengineering in obiee 11g part i and part ii
 
Excel 2007 Unit A
Excel 2007 Unit AExcel 2007 Unit A
Excel 2007 Unit A
 
Access lesson05
Access lesson05Access lesson05
Access lesson05
 
Template builder for word tutorial
Template builder for word tutorialTemplate builder for word tutorial
Template builder for word tutorial
 
PowerPoint Unit A
PowerPoint Unit APowerPoint Unit A
PowerPoint Unit A
 
Access 2013 Unit B
Access 2013 Unit BAccess 2013 Unit B
Access 2013 Unit B
 
Access 2007 Unit B
Access 2007 Unit BAccess 2007 Unit B
Access 2007 Unit B
 
Excel 2013 Unit A
Excel 2013 Unit AExcel 2013 Unit A
Excel 2013 Unit A
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
 
Fomatting Text Tips
Fomatting Text TipsFomatting Text Tips
Fomatting Text Tips
 
Microsoft excel 2013 Quickstart
Microsoft excel 2013 QuickstartMicrosoft excel 2013 Quickstart
Microsoft excel 2013 Quickstart
 
Unit C - CSCI 64
Unit C - CSCI 64Unit C - CSCI 64
Unit C - CSCI 64
 
Excel 2013 Unit C
Excel 2013 Unit CExcel 2013 Unit C
Excel 2013 Unit C
 
TimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionTimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup version
 
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...
Microsoft Dynamics CRM - Customization and Configuration Training Online Cour...
 
Document Generation in Dynamics CRM 2016
Document Generation in Dynamics CRM 2016Document Generation in Dynamics CRM 2016
Document Generation in Dynamics CRM 2016
 
Access.05
Access.05Access.05
Access.05
 

Destacado

Chapter 19 Ppt19
Chapter 19 Ppt19Chapter 19 Ppt19
Chapter 19 Ppt19D
 
Chapter 17 Intro To Controlling Ppt17
Chapter 17 Intro To Controlling Ppt17Chapter 17 Intro To Controlling Ppt17
Chapter 17 Intro To Controlling Ppt17D
 
Chapter 14 Managers And Communication Ppt14
Chapter 14 Managers And Communication Ppt14Chapter 14 Managers And Communication Ppt14
Chapter 14 Managers And Communication Ppt14D
 
Chapter 7 Foundations Of Planning Ppt07
Chapter 7 Foundations Of Planning Ppt07Chapter 7 Foundations Of Planning Ppt07
Chapter 7 Foundations Of Planning Ppt07D
 
Chapter 18 Managing Operations Ppt18
Chapter 18 Managing Operations Ppt18Chapter 18 Managing Operations Ppt18
Chapter 18 Managing Operations Ppt18D
 
What is an organizational chart?
What is an organizational chart?What is an organizational chart?
What is an organizational chart?ARIS Community
 
Chapter 13 Understanding Individual Behavior Ppt13
Chapter 13 Understanding Individual Behavior Ppt13Chapter 13 Understanding Individual Behavior Ppt13
Chapter 13 Understanding Individual Behavior Ppt13D
 
Chapter 15 Motivating Employees Ppt15
Chapter 15 Motivating Employees Ppt15Chapter 15 Motivating Employees Ppt15
Chapter 15 Motivating Employees Ppt15D
 
Chapter 12 Human Resource Management Ppt12
Chapter 12 Human Resource Management Ppt12Chapter 12 Human Resource Management Ppt12
Chapter 12 Human Resource Management Ppt12D
 
Communication skills in english
Communication skills in englishCommunication skills in english
Communication skills in englishAqib Memon
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationAyman Hassan
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating AccessAram SE
 
Monte Carlo G P U Jan2010
Monte  Carlo  G P U  Jan2010Monte  Carlo  G P U  Jan2010
Monte Carlo G P U Jan2010John Holden
 
Database and Access Power Point
Database and Access Power PointDatabase and Access Power Point
Database and Access Power PointAyee_Its_Bailey
 
Lecture1
Lecture1Lecture1
Lecture1rjaeh
 
OWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical MethodsChristian Robert
 
01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20worldAqib Memon
 
Computer Forensics & Windows Registry
Computer Forensics & Windows RegistryComputer Forensics & Windows Registry
Computer Forensics & Windows Registryaradhanalaw
 

Destacado (20)

Chapter 19 Ppt19
Chapter 19 Ppt19Chapter 19 Ppt19
Chapter 19 Ppt19
 
Chapter 17 Intro To Controlling Ppt17
Chapter 17 Intro To Controlling Ppt17Chapter 17 Intro To Controlling Ppt17
Chapter 17 Intro To Controlling Ppt17
 
Chapter 14 Managers And Communication Ppt14
Chapter 14 Managers And Communication Ppt14Chapter 14 Managers And Communication Ppt14
Chapter 14 Managers And Communication Ppt14
 
Chapter 7 Foundations Of Planning Ppt07
Chapter 7 Foundations Of Planning Ppt07Chapter 7 Foundations Of Planning Ppt07
Chapter 7 Foundations Of Planning Ppt07
 
Chapter 18 Managing Operations Ppt18
Chapter 18 Managing Operations Ppt18Chapter 18 Managing Operations Ppt18
Chapter 18 Managing Operations Ppt18
 
What is an organizational chart?
What is an organizational chart?What is an organizational chart?
What is an organizational chart?
 
Chapter 13 Understanding Individual Behavior Ppt13
Chapter 13 Understanding Individual Behavior Ppt13Chapter 13 Understanding Individual Behavior Ppt13
Chapter 13 Understanding Individual Behavior Ppt13
 
Chapter 15 Motivating Employees Ppt15
Chapter 15 Motivating Employees Ppt15Chapter 15 Motivating Employees Ppt15
Chapter 15 Motivating Employees Ppt15
 
Chapter 12 Human Resource Management Ppt12
Chapter 12 Human Resource Management Ppt12Chapter 12 Human Resource Management Ppt12
Chapter 12 Human Resource Management Ppt12
 
Communication skills in english
Communication skills in englishCommunication skills in english
Communication skills in english
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating Access
 
Monte Carlo G P U Jan2010
Monte  Carlo  G P U  Jan2010Monte  Carlo  G P U  Jan2010
Monte Carlo G P U Jan2010
 
Database and Access Power Point
Database and Access Power PointDatabase and Access Power Point
Database and Access Power Point
 
Lecture1
Lecture1Lecture1
Lecture1
 
OWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security Session
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical Methods
 
01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world
 
Computer Forensics & Windows Registry
Computer Forensics & Windows RegistryComputer Forensics & Windows Registry
Computer Forensics & Windows Registry
 

Similar a Ch06 Access (20)

Ch06 cmpt110
Ch06 cmpt110Ch06 cmpt110
Ch06 cmpt110
 
AIA101.4.Automating Access
AIA101.4.Automating AccessAIA101.4.Automating Access
AIA101.4.Automating Access
 
Excel 2007 Unit P
Excel 2007 Unit PExcel 2007 Unit P
Excel 2007 Unit P
 
Excel 2007 Unit I
Excel 2007 Unit IExcel 2007 Unit I
Excel 2007 Unit I
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
VT University Live Session 3
VT University Live Session 3VT University Live Session 3
VT University Live Session 3
 
Ch07 cmpt110
Ch07 cmpt110Ch07 cmpt110
Ch07 cmpt110
 
It203 class slides-unit5
It203 class slides-unit5It203 class slides-unit5
It203 class slides-unit5
 
Access 2 day course
Access 2 day courseAccess 2 day course
Access 2 day course
 
MS Access Macros
MS Access MacrosMS Access Macros
MS Access Macros
 
Access2007 Getuptospeed
Access2007  GetuptospeedAccess2007  Getuptospeed
Access2007 Getuptospeed
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
 
TFI Leverage Excel 2007 (QAT) 011310
TFI Leverage Excel 2007 (QAT) 011310TFI Leverage Excel 2007 (QAT) 011310
TFI Leverage Excel 2007 (QAT) 011310
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
SharePoint Project Phase 3 to 4
SharePoint Project Phase 3 to 4SharePoint Project Phase 3 to 4
SharePoint Project Phase 3 to 4
 
Excel ch10
Excel ch10Excel ch10
Excel ch10
 
Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
 
Whats new in visual studio 2017
Whats new in visual studio 2017Whats new in visual studio 2017
Whats new in visual studio 2017
 
Intake 37 9
Intake 37 9Intake 37 9
Intake 37 9
 
Exciting features in visual studio 2017
Exciting features in visual studio 2017Exciting features in visual studio 2017
Exciting features in visual studio 2017
 

Más de D

Chapter 10 Organizational Structure And Design Ppt10
Chapter 10 Organizational Structure And Design Ppt10Chapter 10 Organizational Structure And Design Ppt10
Chapter 10 Organizational Structure And Design Ppt10D
 
Chapter 11 Communication And Information Technology Ppt11
Chapter 11 Communication And Information Technology Ppt11Chapter 11 Communication And Information Technology Ppt11
Chapter 11 Communication And Information Technology Ppt11D
 
Chapter 9 Planning Tools Techniques Ppt09
Chapter 9 Planning Tools Techniques Ppt09Chapter 9 Planning Tools Techniques Ppt09
Chapter 9 Planning Tools Techniques Ppt09D
 
Chapter 8 Strategic Management Ppt08
Chapter 8 Strategic Management Ppt08Chapter 8 Strategic Management Ppt08
Chapter 8 Strategic Management Ppt08D
 
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06Chapter 6 Decision Making The Essence Of The Managers Job Ppt06
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06D
 
Chapter 5 Social Responsibility And Managerial Ethics Ppt05
Chapter 5 Social Responsibility And Managerial Ethics Ppt05Chapter 5 Social Responsibility And Managerial Ethics Ppt05
Chapter 5 Social Responsibility And Managerial Ethics Ppt05D
 
Chapter 4 Managing In A Global Environmen Ppt04
Chapter 4 Managing In A Global Environmen Ppt04Chapter 4 Managing In A Global Environmen Ppt04
Chapter 4 Managing In A Global Environmen Ppt04D
 
Chapter 3 Organiz Culture And Environ The Constraints Ppt03
Chapter 3 Organiz Culture And Environ The Constraints Ppt03Chapter 3 Organiz Culture And Environ The Constraints Ppt03
Chapter 3 Organiz Culture And Environ The Constraints Ppt03D
 
Chapter 2 Management Yesterday And Today Ppt02
Chapter 2 Management Yesterday And Today Ppt02Chapter 2 Management Yesterday And Today Ppt02
Chapter 2 Management Yesterday And Today Ppt02D
 
Stu R C8e Ch06
Stu R C8e Ch06Stu R C8e Ch06
Stu R C8e Ch06D
 
Stu R C8e Ch15
Stu R C8e Ch15Stu R C8e Ch15
Stu R C8e Ch15D
 
Stu R C8e Ch15 11
Stu R C8e Ch15 11Stu R C8e Ch15 11
Stu R C8e Ch15 11D
 
Stu R C8e Ch 13
Stu R C8e Ch 13Stu R C8e Ch 13
Stu R C8e Ch 13D
 
Stu R C8e Ch13 12
Stu R C8e Ch13 12Stu R C8e Ch13 12
Stu R C8e Ch13 12D
 
Stu R C8e Ch12 10
Stu R C8e Ch12 10Stu R C8e Ch12 10
Stu R C8e Ch12 10D
 

Más de D (15)

Chapter 10 Organizational Structure And Design Ppt10
Chapter 10 Organizational Structure And Design Ppt10Chapter 10 Organizational Structure And Design Ppt10
Chapter 10 Organizational Structure And Design Ppt10
 
Chapter 11 Communication And Information Technology Ppt11
Chapter 11 Communication And Information Technology Ppt11Chapter 11 Communication And Information Technology Ppt11
Chapter 11 Communication And Information Technology Ppt11
 
Chapter 9 Planning Tools Techniques Ppt09
Chapter 9 Planning Tools Techniques Ppt09Chapter 9 Planning Tools Techniques Ppt09
Chapter 9 Planning Tools Techniques Ppt09
 
Chapter 8 Strategic Management Ppt08
Chapter 8 Strategic Management Ppt08Chapter 8 Strategic Management Ppt08
Chapter 8 Strategic Management Ppt08
 
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06Chapter 6 Decision Making The Essence Of The Managers Job Ppt06
Chapter 6 Decision Making The Essence Of The Managers Job Ppt06
 
Chapter 5 Social Responsibility And Managerial Ethics Ppt05
Chapter 5 Social Responsibility And Managerial Ethics Ppt05Chapter 5 Social Responsibility And Managerial Ethics Ppt05
Chapter 5 Social Responsibility And Managerial Ethics Ppt05
 
Chapter 4 Managing In A Global Environmen Ppt04
Chapter 4 Managing In A Global Environmen Ppt04Chapter 4 Managing In A Global Environmen Ppt04
Chapter 4 Managing In A Global Environmen Ppt04
 
Chapter 3 Organiz Culture And Environ The Constraints Ppt03
Chapter 3 Organiz Culture And Environ The Constraints Ppt03Chapter 3 Organiz Culture And Environ The Constraints Ppt03
Chapter 3 Organiz Culture And Environ The Constraints Ppt03
 
Chapter 2 Management Yesterday And Today Ppt02
Chapter 2 Management Yesterday And Today Ppt02Chapter 2 Management Yesterday And Today Ppt02
Chapter 2 Management Yesterday And Today Ppt02
 
Stu R C8e Ch06
Stu R C8e Ch06Stu R C8e Ch06
Stu R C8e Ch06
 
Stu R C8e Ch15
Stu R C8e Ch15Stu R C8e Ch15
Stu R C8e Ch15
 
Stu R C8e Ch15 11
Stu R C8e Ch15 11Stu R C8e Ch15 11
Stu R C8e Ch15 11
 
Stu R C8e Ch 13
Stu R C8e Ch 13Stu R C8e Ch 13
Stu R C8e Ch 13
 
Stu R C8e Ch13 12
Stu R C8e Ch13 12Stu R C8e Ch13 12
Stu R C8e Ch13 12
 
Stu R C8e Ch12 10
Stu R C8e Ch12 10Stu R C8e Ch12 10
Stu R C8e Ch12 10
 

Ch06 Access

  • 1. Automating Database Processing Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 1 Chapter 6 “An organization’s ability to learn, and translate that learninginto action rapidly, is the ultimate competitive advantage.”—Jack Welch
  • 2. Chapter Introduction Design and implement user-friendly menu Called switchboard Macros Automate repetitive tasks Conditions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 2
  • 3. Tools Covered in This Chapter AutoExec macro AutoKeys macro Macro window Startup dialog box Switchboard Manager Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 3
  • 4. Level 1 Objectives: Automating Tasks with Switchboards and Macros Create a well-designed switchboard to provide a user interface for a database Automate tasks by creating basic macros Specify what happens when a database opens Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 4
  • 5. Understanding Switchboards Switchboard Special kind of form Appears when database opened Lists options for working with database objects Select up to eight objects to list on switchboard Determine what action Access should take when users select option Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 5
  • 6. Understanding Switchboards (continued) Typical switchboard buttons Open forms reports and other objects Open other switchboards that list additional database objects Close switchboard Open the Navigation Pane Close Access Main switchboard Large number of database objects Launches other switchboards Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 6
  • 7. Typical Switchboard Design Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 7
  • 8. Designing a Switchboard Switchboard Manager Tool to design and customize switchboard Create main switchboard Add buttons Specify button properties Access creates switchboard form Only one switchboard per database Can contain many pages Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 8
  • 9. Creating a Switchboard Open Switchboard Manager Switchboard Manager dialog box Use five buttons on Switchboard Manager dialog box to perform tasks Create secondary switchboards first Verify new form creation Switchboard item table Keeps track of switchboard items commands and arguments Should be altered only through Switchboard Manager Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 9
  • 10. Switchboard Manager Buttons Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 10
  • 11. Edit Switchboard Item Dialog Box Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 11
  • 12. Switchboard Commands Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 12
  • 13. Formatting a Switchboard By default Access switchboards share same layout and design Including background colors and placement of title Switchboard Manager doesn’t provide options for modifying switchboard design Format switchboard in form design view Do not change command buttons or properties Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 13
  • 14. Understanding Basic Macros Macro Action or series of actions Save time and ensure accuracy Usually assigned to key, key combination, or button Composed of series of actions organized in sequence in which they should be performed Create macro Using Macro window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 14
  • 15. Common Macro Actions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 15
  • 16. Creating a Macro Create Access macro in Macro window Select the Create tab, and then click the Macro button in the Other group Action column List actions macro performs Click list arrow in action column Access provides over 50 different actions Comment column Document action by describing what task it performs Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 16
  • 17. Creating a Macro (continued) Action arguments pane Provide additional information for performing macro action Arguments needed vary depending on selected action chosen Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 17
  • 18. Running a Macro In Macro window Click the Run button in the Design tab Click Run Macro on the Database Tools Ribbon, click the list arrow and select the macro, and then click OK In the Navigation Pane, click Macros, right-click the macro name, and then click Run Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 18
  • 19. Macro Design Toolbar Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 19
  • 20. Editing a Macro Use Macro window Rearrange order of actions Drag action line to new position Insert new action between two existing actions Right-click row Click insert rows Delete action Right-click row Click delete rows Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 20
  • 21. Setting Startup Options Startup options Access performs when database opens Use Startup dialog box Bypass Startup Options Press and hold down shift key when opening database Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 21
  • 22. Specifying Startup Options in the Startup Dialog Box Options Display form Display navigation pane Allow full menus Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 22
  • 23. Startup Dialog Box Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 23
  • 24. Creating a Splash Screen Splash screen Displays when database opens Contains Logo Text Can only display splash screen or switchboard automatically Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 24
  • 25. Creating a Splash Screen (continued) AutoExec Special macro Runs when database opens Before startup dialog box options Can use to display splash screen Create splash screen form Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 25
  • 26. Creating an AutoExec Macro Create macro that contains actions Access should perform when database opened Save macro using name AutoExec Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 26
  • 27. Level 1 Summary Switchboard Special kind of form Appears when database opened Macro Use to automate repeated actions Startup options dialog box Splash screen Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 27
  • 28. Level 2 Objectives:Creating Advanced Macros Consolidate automated tasks by creating a macro group Create buttons that can perform a series of actions Troubleshoot macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 28
  • 29. Understanding Macro Groups Macro group Two or more macros placed within same macro file Consolidate related macros Manage large numbers of macros Only group name displayed as macro object in database window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 29
  • 30. Creating a Macro Group Logical to organize similar macros within group To create Click the Create tab and then click the Macro button Click the Macro Names button on the Design tab. Access adds the Macro Name column to the left of the Action column In the Macro Name column, enter the name of a macro In the Action column, enter the corresponding actions for the macro Enter comments as needed in the Comment column, and set arguments as needed in the Action Arguments pane Save the macro group, using the “mcr” prefix in the object name Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 30
  • 31. Running the Macros in a Macro Group Run particular macro within group Click the Run Macro button in the Macro group on the Database Tools Ribbon Select the list arrow to choose the macro name Click the macro name Click OK Switchboard Manager and many property sheets Specify name of macro to run Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 31
  • 32. Running the Macros in a Macro Group Run macro object Enter or select name Run only one macro in macro group Use special notation mcrGroupName.mcrMacroName Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 32
  • 33. Creating an AutoKeys Macro Group AutoKeys macro group Assign macro action or set of actions to key or key combination Macro name column Type key or key combination Use special syntax SendKeys action Sends keystrokes to Access or to another active program Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 33
  • 34. Examples of Key Combinations for the Autokeys Macro Group Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 34
  • 35. Modifying the Switchboard to Run Macros Modify switchboard to include Macro group listing macros that open queries Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 35
  • 36. Specifying Conditions and Events for Macros Specify conditions for performing macro actions Assign macro to control Event-driven programming Running macro when user interacts with object Event State condition or occurrence that Access recognizes Event property Specifies how object responds when event occurs Set to macro name to run macro when even occurs Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 36
  • 37. Assigning a Macro to a Control Create macro or macro group that performs series of actions Assign macro to control Add command button to form by opening form in Design view Attach macro with desired actions to command button Using On Click property Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 37
  • 38. Specifying Conditions in a Macro Where condition argument Refer to controls on form that are not currently active Use control’s complete name Format [Forms]![formName]![controlName] Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 38
  • 39. Troubleshooting Macros Macros containing arguments Especially error prone Error types Syntax error Logic error Run-time error Troubleshooting tools Single step through execution of macro, using debug window Print macro code Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 39
  • 40. Printing Macros Open Documenter dialog box Select macro Click options button to select details of macro to print Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 40
  • 41. Single Stepping a Macro Runs macro one action at time Pausing between actions Make sure actions appear in correct order and with correct arguments Use Single Step button Macro Single Step dialog box Buttons Step Halt Continue Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 41
  • 42. Using Breakpoints and the Debug Window Breakpoint Code inserted in macro Signals where to stop macro Examine values of actions controls, and arguments macro using in debug window Debug window Shows macro as it appears in VBA code Examine details of macro code in debug window Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 42
  • 43. Using Breakpoints and the Debug Window (continued) Immediate pane Displays current value of controls and arguments Display using ? operator Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 43
  • 44. Level 2 Summary Macro group Conditions for macros Assign macro to control Debug macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 44
  • 45. Level 3 Objectives:Macro Conditions Display message boxes under specified conditions Run a macro when a form opens or a report prints Use a macro to validate data Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 45
  • 46. Exploring Macro Conditions Macro conditions Logical expressions that result in true or false answer Depending on outcome Macro can perform one set of actions or another Enter macro conditions Open condition column in Macro window By clicking Conditions button If condition true Access performs corresponding action in action column Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 46
  • 47. Exploring Macro Conditions Perform more than one action if condition true Enter conditional statement in condition column Select actions in action column in order Enter ellipsis (…) for each subsequent action associated with condition in condition column Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 47
  • 48. Exploring Macro Conditions (continued) SetValue action Change property of object by disabling, updating, hiding, or displaying control Arguments Item Expression Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 48
  • 49. Assigning a Macro to an Object Event Assign macro to object By specifying macro name in event property of object Event categories Report Section Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 49
  • 50. Report Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 50
  • 51. Report Section Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 51
  • 52. Using Message Boxes with Forms Form events can also trigger macros Use to Validate data Set values Navigate between forms Filter, find, and print records Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 52
  • 53. Form Events Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 53
  • 54. Using Message Boxes with Forms MsgBox command Opens message box Displays warning or informational message MsgBox ("message" sum of button and icon values "title") Returns value depending on which button clicked Create condition that checks to see which button users click Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 54
  • 55. Using Message Boxes with Reports When conditions in macro references name of control from source Source must be open when condition tested Can hide window while macro tests condition MsgBox action Opens message box and displays warning or informational message Similar to using MsgBox command Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 55
  • 56. Using Message Boxes with Reports (continued) MsgBox action arguments Message Beep Type Title Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 56
  • 57. Validating Data with Macros Validation field properties have limits Validate data using more than one rule and more than one validation message Create macro Domain aggregate functions Calculate statistics for set of records (recordset) or domain, from table or query Dcount function Dcount(expression, table or query, condition) Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 57
  • 58. Common Domain Aggregate Functions Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 58
  • 59. Level 3 Summary Conditional expressions in macros Assign macros to events Message boxes Msgbox command Msgbox action Validate data with macros Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 59
  • 60. Chapter Summary Switchboard Provides main menu for Access application Macro Automates repetitive tasks Can use conditional expressions Associate with command buttons or other controls Debugger Find errors in macros by stepping though each statement Succeeding in Business with Microsoft Office Access 2007: A Problem-Solving Approach 60