Microsoft Access 2010

Similar documents
M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A

M I C R O S O F T A C C E S S : P A R T 2 G E T T I N G I N F O R M A T I O N O U T O F Y O U R D A T A

Candy is Dandy Project (Project #12)

Getting started with Ms Access Getting Started. Primary Key Composite Key Foreign Key

Microsoft Access II 1.) Opening a Saved Database Music Click the Options Enable this Content Click OK. *

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

Microsoft Access 2010

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2010

Introduction to Microsoft Excel 2010

Open. Select the database and click. Print. Set printing options using the dropdown menus, then click the

INTRODUCTION ACCESS 2010

= 3 + (5*4) + (1/2)*(4/2)^2.

Tutorial 2. Building a Database and Defining Table Relationships

Table of Contents COURSE OVERVIEW... 5

Excel Advanced

GO! with Microsoft Access 2016 Comprehensive

Microsoft Access 2013

Microsoft Access 2013

EXCEL ADVANCED Linda Muchow

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Microsoft Access 2013

Instructions for Using the Databases

Microsoft Access 2010

Chapter-2 Digital Data Analysis

Access Intermediate

Excel Level 1

Excel Tables and Pivot Tables

Advanced Excel Charts : Tables : Pivots

Microsoft Excel 2010 Training. Excel 2010 Basics

Introduction to Microsoft Access 2016

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Excel. Spreadsheet functions

PivotTables & Charts for Health

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

M I C R O S O F T E X C E L P A R T 2 : W O R K I N G WITH NUMBERS

Introduction to Microsoft Excel 2010

WEEK NO. 12 MICROSOFT EXCEL 2007

Microsoft Excel 2007 Lesson 7: Charts and Comments

Beginner s Guide to Microsoft Excel 2002

Microsoft Access 2007 Level 3

Open a new Excel workbook and look for the Standard Toolbar.

Intermediate Excel Training Course Content

-Using Excel- *The columns are marked by letters, the rows by numbers. For example, A1 designates row A, column 1.

Intermediate Excel 2003

Advanced Excel for EMIS Coordinators

This book is about using Microsoft Excel to

EXCEL BASICS. Helen Mills META Solutions

Making Tables and Graphs with Excel. The Basics

Complete Quick Reference Summary

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010

Microsoft Office 2016 Mail Merge

Exchange (Copy, Import, Export) Data Between Excel and Access

Intermediate Microsoft Access 2010

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50

Using Microsoft Access

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Using Microsoft Word. Paragraph Formatting. Displaying Hidden Characters

Importing and Exporting Data

2. This is a cell; this cell is designated as A1.

THE EXCEL ENVIRONMENT... 1 EDITING...

Microsoft How to Series

Using Microsoft Excel

Microsoft Excel 2007

Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR

Integrating Word with Excel

Access Intermediate

Text University of Bolton.

download instant at

Microsoft Excel 2013 Comments (Level 3)

Microsoft Excel 2010 Basic

ICDL & OOo BASE. Module Five. Databases

Level 6 Relational Database Unit 3 Relational Database Development Environment National Council for Vocational Awards C30147 RELATIONAL DATABASE

The specific steps to build Wooden Crafts database are here: 1. Create New Database. i. After opening Access, click Blank Desktop Database :

Access Intermediate

Spreadsheet Concepts: Creating Charts in Microsoft Excel

Section 1 Microsoft Excel Overview

Quick Guide for Excel 2015 Data Management November 2015 Training:

Microsoft Excel Microsoft Excel

Chemistry 30 Tips for Creating Graphs using Microsoft Excel

Excel 2007 New Features Table of Contents

Enterprise Reporting -- APEX

Microsoft Excel 2007

Excel 2013 Intermediate

Access Intermediate

EXCEL 2007 TIP SHEET. Dialog Box Launcher these allow you to access additional features associated with a specific Group of buttons within a Ribbon.

Excel 2013 for Beginners

Advanced Excel Selecting and Navigating Cells

IITS Workshop Creating a Gradebook in Microsoft Office Excel 2007

Creating a PowerPoint Presentation

Englische Access 2016-Trainingsskripte für IT Seminare und EDV Schulungen als Word-Dokument zum Ausdrucken und fürs Intranet

Excel Part 3 Textbook Addendum

Using Microsoft Excel

Office Applications II Lesson Objectives

Excel Shortcuts Increasing YOUR Productivity

Office 2016 Excel Basics 25 Video/Class Project #37 Excel Basics 25: Power Query (Get & Transform Data) to Convert Bad Data into Proper Data Set

Data. Selecting Data. Sorting Data

SPREADSHEET (Excel 2007)

Working with Data in Microsoft Excel 2010

Excel Intermediate

Transcription:

www.jwalkonline.org/main michael@jwalkonline.org @MichaelJWalk Microsoft Access 2010 Part 3 Michael J. Walk It's about control: use advanced features of Access to control data entry, automate processes, and make database navigation easy. Now that you can use your database to store, access, and manipulate your data, add advanced control features to ensure data integrity, protect your database, visualize your data in charts, and make it easy to navigate.

How to Use This Handout 1 Table of Contents Access Database Object Review... 2 Importing Data... 3 Importing from Excel... 3 Advanced Table Design... 5 Validation Rules... 5 Field-level rule... 5 Record-Level Validation Rule... 8 Calculated Fields... 9 Required Values... 10 Data Visualization... 11 Pivot Charts... 11 Creating a Chart on a Report / Form... 12 Using Forms to Improve the User Experience... 14 Using Command Buttons to Open Objects and Run Tasks... 14 Using Form Controls as Query Criteria... 15 Creating a Basic Macro... 16 Basic Database Maintenance... 17 Backing up your Database... 17 Creating a Password for your Database... 17 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

2 Microsoft Access 2010 How to Use This Handout This handout serves as a point of reference for your workshop. However, you may also use the handout after the class is over to help you remember how to perform some of the tasks covered during the workshop. Click Paths Throughout this handout, you will be given directions to perform a series of mouse clicks also called a click path. For instance, to save a change to an Access object, you should click on the File tab in the ribbon, then click on Save. In this handout, that click path is displayed using a bold font for the words to click on connected by a single right-pointing arrow ( ): File Save In some cases, you must find the correct section of the ribbon before clicking on an icon or button. In these cases, the ribbon section will be highlighted in gray, for example: External Data Import & Link Excel In this example, Import & Link is a ribbon section. Keyboard Directions You also will be given directions to press certain keys on your keyboard. There are two kinds of key press sequences: (1) simultaneous and (2) sequential. 1) Simultaneous key presses refers to keys you have to hold down together to perform a task. Simultaneous key presses are displayed using the plus sign (+) between the keys to be pressed typed in caps. For example, the find box is opened by pressing CTRL + F. CTRL stands for the control key. ALT stands for the alternate key. WIN stands for the windows key (only applies to PCs with windows keys). 2) Sequential key presses refers to keys you have to press in sequence (one after the other it is not necessary to hold them down). Sequential key presses are displayed using a pipe character ( ) between the keys to be pressed typed in caps. For example, one way to save your file under a new file name is to type ALT, then F, then A. This would be displayed as: ALT F A. If you like keyboard shortcuts, Microsoft Office has provided a very robust listing of them at: http://office.microsoft.com/en-us/access-help/keyboard-shortcuts-for-access-hp010341802.aspx. I provide a lot in this workshop, but their list exhaustive.

Access Database Object Review 3 Access Database Object Review 1. Table: stores our data. Without a table, we have no information in our database. 2. Form: allows us to view and enter data. Also useful for user control (i.e., helping making interaction with the database easier). 3. Query: retrieves, summarizes, and manipulates information in tables. 4. Report: creates a printer-friendly and aesthetically pleasing presentation / summary of data from a table(s) or query. 5. Macro: allows us to run complex or multiple tasks in sequence. Importing Data Using Access import tools, we can import from Excel, text files, XML files, SharePoint, other databases (e.g., Oracle, SQL), etc. There are three basic types of import actions: 1. Import: creates a carbon copy of the source file and places that data in the Access database as a table. No connection remains between the Access database and the source file. 2. Link 1 : creates a live electronic link to the source file. If a record is added to the source file, a record is added to the linked access table. 3. Append: adds a carbon copy of the source file to the bottom of a selected existing Access table. Importing from Excel 1. Click on External Data Import & Link Excel. 2. Browse to the desired source file (which Excel file you re trying to import). 3. Choose your desired import action (import, link, or append) 1 Links are great when your database files are very large. By storing the actual data in the source file, you decrease the likelihood that you will exceed the 2GB limit of an Access database file. 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

4 Microsoft Access 2010 4. Answer the following series of prompts (some slight variation is possible, depending on which import action you chose 2. a. Does the first row contain column headings (or field names)? b. Assign the appropriate data type to each field. c. Decide whether to choose your own primary key or to let Access add one. { -------------------------------------------------------- We will import data for this class together. Some points during the import: 1) Ratings sheet of RYRData_for class.xlsx a. Data Types i. RatingID Double ii. RiderID Text iii. TimeSent Date/Time iv. Rating Integer v. BusRoute Integer vi. Complete Yes/No b. Primary Key RatingID c. Change Complete Lookup display to check box 2) Riders sheet of RYRData_for class.xlsx a. Data Types i. RiderID Text 2 When appending, your source file MUST contain field names in the first row. The field names in your source file must exactly match the field names of your destination table.

Advanced Table Design 5 ii. DOB Date/Time iii. Subscribed Yes/No iv. FirstRating Date/Time b. Primary Key RiderID c. Change Subscribed Lookup display to check box 3) Bus Lines.xlsx a. Data Types i. Number Integer b. Primary Key Number ---------------------------------------------------------------------------------------- } Advanced Table Design A well-designed table with not only provide all the right fields to collect very specific pieces of information it also provides mechanisms to help reduce the probability for data error. Here are two major features of table design that can be used to increase data integrity. Validation Rules A validation rule is a rule that tells the table what qualities a cell value must have for that value to be valid. For example, many tables have date fields where we enter past events. It is usually a good idea to ensure that a date does not get entered that is in the future. We can do this using a validation rule. Field-level rule A field-level rule applies to values in a single field and can be used to check the appropriateness of the value in a single field for a single record upon data entry. For example, let s say you are entering the dates of birth for a group of new college students. The date you type should not be in the future. Therefore, we can set a field-level rule on our date of birth field to check if the date entered is not in the future. Let s provide a validation rule that makes sure the DOB is before today. Adding a field-level rule in datasheet view 1. Click inside the field you wish to add the validation rule to (DOB). 2. On your ribbon, go to Table Tools Fields Field Validation Validation. 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

6 Microsoft Access 2010 3. Click on Field Validation Rule. This will open the Builder dialog box where you can provide the validation rule. There are an infinite number of rules that you could use, but in this example, you ll have to type: Now() is a common Office function. It returns the current date and time from your computer s clock. 4. Then click OK. Your rule is now applied to that field.

Advanced Table Design 7 5. If you want special text to pop up when someone violates that validation rule, then you must set the Validation Message. Validation Message is found under Table Tools Fields Field Validation Validation Field Validation Message. Adding a field-level rule in design view 1. While in design view, click on the field that needs a validation rule. In the properties window below, you will find a property called Validation Rule. 2. You may either type the rule directly in the box or click on the builder box to open up the Expression Builder. 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

8 Microsoft Access 2010 Record-Level Validation Rule If you want a validation rule to check the appropriateness of values in 2 or more fields in a given record, you must apply a record-level validation rule. Let s create a rule to make sure that the FirstRating is after the DOB. Adding a record-level validation rule in datasheet view 1. Go to Table Tools Fields Field Validation Record Validation

Advanced Table Design 9 2. This will open the Expression Builder for you to type the validation rule. [DOB] < [FirstRating] 3. After setting the rule, it is best to set the Record Validation Message. To set a record-level Validation Rule in design view 1. In design view, in the ribbon, click on Table Tools Design Show/Hide Property Sheet 2. In the TABLE s property sheet, you will find the validation rule cell. Type the rule in that cell and provide the message below that cell. Calculated Fields You can add fields to your tables that are calculated based on values in other fields in the same table. For example, if you have a field containing minutes, you could add a calculated field that calculates the age (in decimal years) when the person provided their first rating. To add a calculated field in datasheet view 1. Using, the ribbon, go to Table Tools Fields Add & Delete More Fields Calculated Field select your field type. 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

10 Microsoft Access 2010 2. This will bring up the Expression Builder box. Type the calculation in the box and you are done. ([FirstRating] [DOB]) / 365.25 3 3. Change the name of the field by double-clicking on the field heading and overwriting the current name. To create a calculated field in design view 1. Go to the next blank field. In the data type drop-down, find Calculated 2. This will bring up the Expression Builder box. Type the calculation in the box. Required Values If you have a field in your table that CANNOT be left blank when a new record is inserted, change that field s Required property to TRUE. In datasheet view: 1. Click in the field that you wish to make required. 2. In the ribbon under Table Tools Fields Field Validation Required. 3 362.25 is the average number of days in a year.

Data Visualization 11 Data Visualization Pivot Charts You can turn any query or table in a pivot chart / pivot table. (A pivot chart is a graphical representation of a pivot table; I will use pivot chart throughout this section, but am referring equally to either one.) 1. Switch to pivot table view by using your ribbon: Home Views Pivot Chart 2. This will bring up the Pivot Chart view. Pivot charts contain 4 sections: a. X-axis (categories) b. Y-axis (data values) 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

12 Microsoft Access 2010 c. Series (legend) d. Filters 3. At the right of your screen, the Chart Field List should be displayed. Simply drag and drop the fields needed to create the chart into their proper location. Creating a Chart on a Report / Form You can also embed a chart (graph) into a report or form. 1. Create a new report in design view. 2. Use the Chart tool in the ribbon, and place the chart in the form s design area.

Data Visualization 13 3. Follow the prompts to add the graph. 4. To edit the appearance of the graph, double-click on it. 5. You can: a. Change the chart type b. Edit font sizes, font types, font colors c. Add/remove data labels d. And many more 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)

14 Microsoft Access 2010 Using Forms to Improve the User Experience Using Command Buttons to Open Objects and Run Tasks It is very common to provide your database users with a form that will allow them to perform tasks (run reports, run queries, import data) with just a click of a button. General Procedure for Using Forms for User Control 1. Create all necessary objects to perform the task independent of a special button. 2. Create a blank form. Add a button to it that will perform the necessary task. Example task: running a query by clicking a button 1. Create the query that you wish to run. Save the query under a unique name. 2. Create a blank form by going to Create Forms Blank Form 3. Add a title to the form (if needed; Form Layout Tools Design Header/Footer Title) 4. Add a button to the form by clicking on the button icon in the ribbon, and then clicking in the blank space on the form. 5. This will open the Command Button Wizard. 6. Under the Category Miscellaneous, you will find the Action, Run Query. Select this. Then select the query you wish to run. 7. Edit the text that will appear on the button. 8. You re done.

Using Forms to Improve the User Experience Using Form Controls as Query Criteria Sometimes you not only want to run a query from a form, but you also want to allow the user to specific criteria that the query should use. By creating a couple of text boxes on the same form that runs the query, we can allow the user to specific a start date and end date for a particular query. 1. Add two text box controls to the form by clicking on the text box control icon in the ribbon and then clicking on the blank form where you want to place the box. 2. Open the Property Sheet for the first text box. On the Property Sheet, click on the Other tab. Change the Name property to StartDate. 3. Do the same for the second text box; however, name it EndDate. 4. Edit the query s design so that, in the criteria for the TimeSent field, you have the following syntax: Replace Form1 with whatever the form s saved name will be. Replace StartDate and EndDate with the actual control name (if different). 5. Now, when the query runs, it will be looking for this form to be open and for these text boxes to have dates typed into them so the query can use those dates as criteria for retrieving the information from the table. 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013) 15

16 Microsoft Access 2010 Creating a Basic Macro Basic Process 1. Click on Create Macros and Code Macro 2. Use the drop-down menu to select the desired action(s) 3. Complete all required properties for that action 4. Save 5. Click run Example task: Create a macro to export query results 1. Click on Create Macros and Code Macro 2. Select ImportExportSpreadsheet in the dropdown box. 4 3. As seen above, you will get a series of properties or settings to complete. 4. Transfer type: Export 5. Spreadsheet type: Excel Workbook 6. Table name: (name of table/query to export) 7. File name: (full path of desired destination file, including file extension) 8. Save the macro. 9. When you run the macro, it will first access the table/query, then prepare the results for export to an Excel file that will be dumped in the location you specified in the File Name setting. 4 If this option is not available, be sure that Show All Actions is selected in the ribbon.

Basic Database Maintenance 17 Basic Database Maintenance Backing up your Database It is important to create regular backups of your database. The more critical the information is, the more important it is to create regular backups. 1. In the ribbon, click on File Save & Publish Back Up Database 2. Follow the prompts to create the backup. 3. I recommend keeping the database name the same and then appending the date/time of the backup to the filename to easily tell which back up is the one you want. Creating a Password for your Database Placing a password on your database keeps your database (tables, forms, etc.) secure from others. There IS NO PASSWORD RETRIEVAL, so, don t lose your password. 1. In the ribbon, click on File Info Encrypt with Password 2. Type your password twice when prompted 3. Don t forget it 2013 JWalk Professional Services Part 3 v2.0 (rev 9/7/2013)