Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.

Similar presentations


Presentation on theme: "A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2."— Presentation transcript:

1 A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2

2 A Skills Approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved 2 Working with Tables Chapter 2 Skills 2.1Designing a Table 2.2Adding Fields to Tables in Datasheet View 2.3Adding a Lookup Field from Another Table in Datasheet View 2.4Adjusting Column Widths in Datasheet View 2.5Changing Data Type in Datasheet View 2.6Adding a Total Row 2.7Using Attachment Fields 2.8Modifying Field Properties in Datasheet View

3 A Skills Approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved 3 Working with Tables Chapter 2 Skills 2.9Creating a Table in Design View 2.10Setting the Primary Key 2.11Adding and Deleting Fields in Design View 2.12Modifying Field Properties in Design View 2.13Adding a Lookup Field from a List in Design View 2.14Modifying Lookup Field Properties 2.15Modifying Table Properties 2.16Renaming and Deleting Tables

4 A Skills Approach Designing a Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 4 Skill 2.1 In a relational database, tables are related by common fields. Information about each department is stored only in the Departments table; it is not repeated in the Employees table.

5 A Skills Approach Designing a Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 5 Skill 2.1 You can create a table from the Create tab. The first field is an AutoNumber field.

6 A Skills Approach Designing a Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 6 Skill 2.1 Enter data in each field; Access sets a data type based on the data. The fields are named Field1, Field2, and so on.

7 A Skills Approach Designing a Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 7 Skill 2.1 Click anywhere in a field to rename it. A caption, if you supply one, displays instead of the name.

8 A Skills Approach Adding Fields to Tables in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 8 Skill 2.2 The Click to Add command is the rightmost column in a table. Click it and choose a data type.

9 A Skills Approach Adding Field to Tables in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 9 Skill 2.2 You can add a field to a table from the Table Tools Fields tab. The last section in the gallery, Quick Start, inserts a related group of fields.

10 A Skills Approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved 10 Skill 2.2 You can choose from many data types for a field. Data TypeDescription AutoNumberAutomatically assigned value; often used as a primary key TextShort text data or numbers that are treated as text; up to 255 characters NumberNumerical value Date/TimeNumerical value that is displayed as a date or time CurrencyNumerical value with up to four decimal places Adding Field to Tables in Datasheet View

11 A Skills Approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved 11 Skill 2.2 Data TypeDescription Yes/NoStores a true/false value HyperlinkStores a Web or e-mail address AttachmentAnother file such as an image, a PDF, or a Word document MemoLong blocks of text up to 65,535 characters Calculated FieldAn expression or formula that calculates and displays a value. Adding Field to Tables in Datasheet View

12 A Skills Approach Adding a Lookup Field from Another Table in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 12 Skill 2.3 A Lookup field allows the user to select data from a list. The list can be from another table or query; you can also key a lookup list.

13 A Skills Approach Adding a Lookup Field from Another Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 13 Skill 2.3 Use the Lookup & Relationship data type to start the Lookup Wizard.

14 A Skills Approach Adding a Lookup Field from Another Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 14 Skill 2.3

15 A Skills Approach Adding a Lookup Field from Another Table © 2012 The McGraw-Hill Companies, Inc. All rights reserved 15 Skill 2.3

16 A Skills Approach Adjusting Column Widths in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 16 Skill 2.4 Column widths can be adjusted to better display data. You can drag column borders or use the dialog box.

17 A Skills Approach Changing Data Type in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 17 Skill 2.5 You can select a different data type after data is entered.

18 A Skills Approach Adding a Total Row © 2012 The McGraw-Hill Companies, Inc. All rights reserved 18 Skill 2.6 A Total row uses an aggregate function to display summary values for a field.

19 A Skills Approach Adding a Total Row © 2012 The McGraw-Hill Companies, Inc. All rights reserved 19 Skill 2.6 Aggregate FunctionCalculation SumTotal of all values in the column for number, decimal, and currency field types AverageAverage value, ignoring null values, in the column for number, decimal, date/time, and currency field types CountThe number of items in the column for any data type MaximumLargest value for number, decimal, date/time, and currency field types MinimumSmallest value for number, decimal, date/time, and currency field types Standard DeviationStatistical standard deviation for numeric field types VarianceStatistical variance for numeric field types

20 A Skills Approach Using Attachment Fields © 2012 The McGraw-Hill Companies, Inc. All rights reserved 20 Skill 2.7 An attachment is another file stored in a field.

21 A Skills Approach Using Attachment Fields © 2012 The McGraw-Hill Companies, Inc. All rights reserved 21 Skill 2.7 An attachment might be an image, a Word document, an Excel workbook, a video clip, or other similar data. An attachment field cannot be renamed. The attachment itself is not visible in Datasheet view. It is shown as a paperclip icon. Attachments are limited to 256 MB. You cannot attach program files (.exe or.bat)

22 A Skills Approach Using Attachment Fields © 2012 The McGraw-Hill Companies, Inc. All rights reserved 22 Skill 2.7 Double-click the field in the table to open the Attachments dialog box.

23 A Skills Approach Modifying Field Properties in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 23 Skill 2.8 Field properties affect the appearance and behavior of fields.

24 A Skills Approach Modifying Field Properties in Datasheet View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 24 Skill 2.8 The Table Tools Fields tab includes properties, formatting, and field validation settings.

25 A Skills Approach Creating a Table in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 25 Skill 2.9 To create a table in Design view, name each field, choose the data type, enter an optional description, and set options in the Field Properties pane.

26 A Skills Approach Creating a Table in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 26 Skill 2.9

27 A Skills Approach Setting the Primary Key © 2012 The McGraw-Hill Companies, Inc. All rights reserved 27 Skill 2.10 The primary key is a field that contains unique data in each record.

28 A Skills Approach Setting the Primary Key © 2012 The McGraw-Hill Companies, Inc. All rights reserved 28 Skill 2.10 Primary Key TypeDescription AutoNumberThis is an automatically assigned numeric ID. It cannot be keyed or edited. When data do not include a field that is unique for each record, use this as the data type. Single FieldIf data include a field that is unique for each record (product ID, employee ID, part number), set this field as the primary key. Multiple FieldsWhen data do not have a unique field, create a multiple-field primary key. Hold down the Ctrl key to select multiple row selectors and then click the Primary Key button.

29 A Skills Approach Setting the Primary Key © 2012 The McGraw-Hill Companies, Inc. All rights reserved 29 Skill 2.10 This primary key uses a client’s first and last names as unique identifiers.

30 A Skills Approach Adding and Deleting Fields in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 30 Skill 2.11 You can add a field by inserting a row or by using the first blank row.

31 A Skills Approach Adding and Deleting Fields in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 31 Skill 2.11 Click the Row Selector to choose a field for deletion.

32 A Skills Approach Modifying Field Properties in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 32 Skill 2.12 Field properties include a field size or how data is formatted.

33 A Skills Approach Modifying Field Properties in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 33 Skill 2.12 An Input Mask shows a user how to enter data. The Allow Zero Length property indicates that a field may be left blank.

34 A Skills Approach Modifying Field Properties in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 34 Skill 2.12 There are several predefined masks. Data can be stored without the symbols to save space. Use the Input Mask Wizard to build a mask.

35 A Skills Approach Modifying Field Properties in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 35 Skill 2.12 The user sees this when entering data. Here is the Input Mask in Design View.

36 A Skills Approach Adding a Lookup Field from a List in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 36 Skill 2.13 A Lookup field can be created in Datasheet or Design View.

37 A Skills Approach Adding a Lookup Field from a List in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 37 Skill 2.13 Set the Data Type in Design View to start the Lookup Wizard.

38 A Skills Approach Adding a Lookup Field from a List in Design View © 2012 The McGraw-Hill Companies, Inc. All rights reserved 38 Skill 2.13

39 A Skills Approach Modifying Lookup Field Properties © 2012 The McGraw-Hill Companies, Inc. All rights reserved 39 Skill 2.14 Add or remove items from a list Set how many columns are displayed Control how users interact with the list A lookup field can be modified. You can:

40 A Skills Approach Modifying Lookup Field Properties © 2012 The McGraw-Hill Companies, Inc. All rights reserved 40 Skill 2.14 There is a Modify Lookups button on the Fields tab in Datasheet View. The button opens the Lookup Wizard.

41 A Skills Approach Modifying Lookup Field Properties © 2012 The McGraw-Hill Companies, Inc. All rights reserved 41 Skill 2.14 The Lookup tab in the Field Properties pane in Design view lists the options that can be modified.

42 A Skills Approach Modifying Table Properties © 2012 The McGraw-Hill Companies, Inc. All rights reserved 42 Skill 2.15 The table Property Sheet opens on the right in Design View.

43 A Skills Approach Modifying Table Properties © 2012 The McGraw-Hill Companies, Inc. All rights reserved 43 Skill 2.15 Table PropertyPurpose DescriptionProvide general information or instructions about the table Default ViewSelect a view other than Datasheet view. A table cannot open by default in Design View. Validation Rule Validation Text Define rules for how fields relate to one another such as that a field value must be larger than the value in another field. Validation Text is the message that appears when the rule is violated. FilterSet a permanent filter to show only records that meet criteria defined in this property Order ByDefine a default sort order for the table other than the primary key

44 A Skills Approach Renaming and Deleting Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved 44 Skill 2.16 Right-click a table name in the Navigation Pane to delete it from the database.

45 A Skills Approach Renaming and Deleting Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved 45 Skill 2.16 The command to delete a database object cannot be undone.

46 A Skills Approach Renaming and Deleting Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved 46 Skill 2.16 Relationships are not affected when a table is renamed.

47 A Skills Approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved 47 Creating and modifying tables in Datasheet view Adding a Total row Using Attachment fields Using Lookup fields Creating and modifying tables in Design view Modifying table properties Renaming and deleting tables Working with Tables Recap


Download ppt "A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2."

Similar presentations


Ads by Google