Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

23
Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6

Transcript of Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Page 1: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013

Automating Database Processing

Chapter 6

Page 2: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 2

Chapter Introduction

• Design and implement user-friendly menu– Called navigation form

• Macros– Automate repetitive tasks– Add functionality to reports and forms

Page 3: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 3

Understanding Navigation Forms

• Navigation Form– Special kind of form – Appears when database opened– Makes database navigation similar to a web site

• Main navigation form and subform control automatically built in

Page 4: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 4

Understanding Navigation Forms (cont’d.)

• Can add buttons to main navigation form to work with– Tables– Forms– Queries– Reports

• Drag and drop object to form and create tab– Selecting tab allows instant view of the objects

• Appear in hierarchical format

Page 5: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 5

Create lower level forms before creating the higher level forms

Page 6: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 6

Designing and Creating Navigation Forms

• Main navigation form serves as menu for users when database is opened

• Create lower level of the hierarchy first– Create tabs by drag and drop of object onto form

• Click Navigation button in Forms group of CREATE tab– Select tab layout– Change title and change format, if necessary– Drag forms from Navigation Pane to the [Add New] tab– Use Layout view and Form Selector button to change form

location or size• Repeat until all needed forms are on the navigation form

Page 7: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 7

Creating Navigation Forms (cont’d.)

• Preview all forms in Form View– Test to ensure working correctly

• Create forms for reports as created for forms– Preview and test all tabs to ensure working

correctly• Create main form to provide easy navigation

through database• Last item on main form should be a button to

close the database

Page 8: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 8

Navigation Form Layout Options

Page 9: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 9

Example Navigation Form Design

When using a navigation form, it's a good idea to set database options that restrict the Ribbon to specified options and to hide the Navigation pane preventing users from accessing commands they could use to change the database design.

Page 10: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 10

Understanding Basic Macros

• Macro – Action or series of actions (Recall the Close

Database button on the previous slide)– Save time and ensure accuracy– Automate repetitive tasks– Composed of series of actions organized in

sequence in which they should be performed• Create macro– Using Macro window

Page 11: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 11

Page 12: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 12

Creating a Macro

• Create Access macro in Macro window• Select the CREATE tab, and then click the

Macro button in the Macro & Code group• Action catalog – Select features wanted– Actions to be performed– Click the Add New Action list arrow in the Macro

Builder– Scroll through list to action you want

Page 13: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 13

Creating a Macro (cont’d.)

• Action arguments– Provide additional information for performing

macro action– Arguments needed vary depending on selected

action chosen• Save macro with descriptive name, using mcr

prefix

Page 14: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 14

Running a Macro

• Three ways to run a macro:– In MACRO TOOLS DESIGN tab, click the Run button

in the Tools group– On DATABASE TOOLS Tab, click the Run Macro

button in the Macro group• Select the macro in the Run Macro dialog box, click OK

– In the Navigation Pane, click Macros, right-click the macro name, and then click Run

Page 15: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 15

Editing a Macro

• Use Macro Builder to edit• Rearrange order of actions – Move up or Move down arrow or drag action line to new

position• Insert new action between two existing actions – Click Add New Action and select the action– Move or drag the new action between the two other

actions• Delete action– Click action then click the Delete button

Page 16: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 16

Creating the Navigation Form to Run Macros Using Command buttons

• Command button executes a series of actions• Use a command button to run a macro– Create the macro that specifies the actions you

want to perform– Add a command button, assigning the macro

Page 17: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 17

Assigning a Macro to a Command Button Control

• Click the Button control in the Controls group on the DESIGN tab

• Click in form where button is to be placed– Command Button Wizard starts

• Select Miscellaneous category and the Run Macro action• Select from available macros

– Repeat until all desired buttons are on form– Save form

Page 18: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 18

Setting Start-up Options

• Start-up options– Access performs when database opens

• Set options using Access Options feature• Bypass Start-up Options– Press and hold down Shift key when opening

database

Page 19: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 19

Specifying Current Database Options

• Options– Display Form– Display Navigation pane– Allow Full Menus

Page 20: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 20

Figure 6.21: Access Options dialog box with options for the current database

Page 21: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 21

Creating a Splash Screen

• Splash screen– Displays when database opens– Contains• Logo• Text such as contact information

• Can only display splash screen or Navigation form automatically

Page 22: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 22

Creating a Splash Screen (cont’d.)

• AutoExec– Special macro– Runs when database opens– Before Access Options dialog box options– Can use to display splash screen

• Create splash screen form in Design view

Page 23: Succeeding in Business with Microsoft Access 2013 Automating Database Processing Chapter 6.

Succeeding in Business with Microsoft Access 2013 23

Creating an AutoExec Macro

• Click the Macro button in the Macros & Code group on the CREATE tab

• In the Macro Builder, select the actions you want the macro to perform

• Select or enter the appropriate arguments• Save the macro using the name AutoExec