Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Office 2007 Access Chapter 3 Maintaining a Database.

Similar presentations


Presentation on theme: "Microsoft Office 2007 Access Chapter 3 Maintaining a Database."— Presentation transcript:

1 Microsoft Office 2007 Access Chapter 3 Maintaining a Database

2 Objectives Add, change, and delete records Search for records Filter records Update a table design Format a datasheet Use action queries to update records 2Microsoft Office 2007: Introductory Concepts and Techniques

3 Objectives Specify validation rules, default values, and formats Create and use single-valued and multivalued Lookup fields Specify referential integrity Use a subdatasheet Sort records Microsoft Office 2007: Introductory Concepts and Techniques3

4 Updating the Database Updating = adding records, deleting records, or editing the data Sometimes more efficient to use a Form for editing rather than the Datasheet Microsoft Office 2007: Introductory Concepts and Techniques4

5 Creating a Simple Form Click the Form button on the Create tab Microsoft Office 2007: Introductory Concepts and Techniques5

6 Creating a Simple Form Microsoft Office 2007: Introductory Concepts and Techniques6 Form View Add New Record Button

7 Searching for a Record Searching = looking for records that satisfy some criteria Examples: “Finding” records is one example of searching; using queries is another To “find” records, click the Find button on the Home tab Microsoft Office 2007: Introductory Concepts and Techniques7

8 Searching for a Record Microsoft Office 2007: Introductory Concepts and Techniques8

9 Understanding Filters Filter = displaying only record(s) that satisfy criterion Four types: Filter by Selection Common Filters Filter by Form Advanced Filter/Sort Microsoft Office 2007: Introductory Concepts and Techniques9

10 Using Filter By Selection Select the data to be filtered (in either Form or Datasheet view) Click the Selection button on the Home tab to display the Selection menu Make the correct choice: Equals … Does Not Equal … Contains … Greater than … Etc. Click the Toggle Filter button Microsoft Office 2007: Introductory Concepts and Techniques10

11 Clearing All Filters Once you have finished using a filter, it is important to “clear” it before running another Click the Advanced button on the Home Tab Click Clear All Filters Microsoft Office 2007: Introductory Concepts and Techniques11

12 Using a Common Filter You can filter individual fields by clicking the arrow to the right of the field name and using a Common Filter “Clear All Filters” first Click the arrow beside the field name to be filtered Make the correct choice from there and choose OK Click the Toggle Filter button Microsoft Office 2007: Introductory Concepts and Techniques12

13 Using Filter By Form Filter by Form allows you to key the Filter criteria in Form view “Clear All Filters” first Click the Advanced button on the Home tab to display the Advanced menu a second time Click Filter By Form on the Advanced menu Microsoft Office 2007: Introductory Concepts and Techniques13

14 Using Advanced Filter/Sort “Clear All Filters” first From Datasheet View, click the Advanced button on the Home tab Click Advanced Filter/Sort Complete the fields – looks like a query screen Click RUN to perform the filter Click Datasheet View to see the entire datasheet with the results applied It’s important to be in Datasheet View to begin this! Textbook does not give directions for this! Microsoft Office 2007: Introductory Concepts and Techniques14

15 Adding/Deleting Fields Inserting/Deleting Fields is known as changing the “structure” of the database You must be in Design View for this Click the row selector to select the row that you wish to become a new field or wish to delete Press the INSERT key to ADD or DELETE to REMOVE the field Microsoft Office 2007: Introductory Concepts and Techniques15

16 Creating a Lookup Field Lookup Field = one that allows the user to “choose” the data instead of keying it In Design View, choose Lookup Wizard for the Field Type Click ‘I will type in the values that I want’ Click the Next button to display the next Lookup Wizard screen Type the first value Press the DOWN ARROW key Continue entering values, pressing DOWN ARROW after each Continue through the Wizard steps Microsoft Office 2007: Introductory Concepts and Techniques16

17 Adding a Multivalued Field Multivalued Field = a field in which more than one value may be set If you want users to be able to select “more than one,” in the Lookup Wizard, click the Allow Multiple Values check box to enable users to select more than one value Microsoft Office 2007: Introductory Concepts and Techniques17

18 Making Mass Changes Mass Changes = changing more than one record or field at a time 5 types of queries: Action Query Update Query Delete Query Append Query Make-Table Query Microsoft Office 2007: Introductory Concepts and Techniques18

19 Using an Update Query Example: Change all records to the client type of MED Create a new design query Click the Update button in the Ribbon, which will add an Update To row Set the criteria and the Update To information Click RUN Microsoft Office 2007: Introductory Concepts and Techniques19

20 Using a Delete Query Example: Delete all records where the amount due is $0.00 Create a new design query Click the Delete button in the Ribbon Set the criteria for the field(s) where you wish rows to be deleted Click RUN Microsoft Office 2007: Introductory Concepts and Techniques20

21 Understanding Validation Validation Rules = Access ensures the data entered is “valid” Rules that the user must follow when entering the data Example: Values in Amount Paid are between 0 and 100,000 Validation Text = Access displays a message if the info is invalid Example: Entry must be between 0 and 100,000 Microsoft Office 2007: Introductory Concepts and Techniques21

22 Specifying a Required Field A Validation Rule can indicate a Required Field (one that cannot be left empty) In Design View, select the field you wish to require Click the Required property box in the Field Properties pane Select Yes Microsoft Office 2007: Introductory Concepts and Techniques22

23 Specifying a Required Field Microsoft Office 2007: Introductory Concepts and Techniques23 Required Property

24 Setting Validation Rule and Text In Design View, select the field you wish to have Access validate Example: Click the Validation Rule property box and then type >=0 and <=100000 Click the Validation Text property box and then type Must be at least $0.00 and at most $100,000 Microsoft Office 2007: Introductory Concepts and Techniques24

25 Specifying a Range Microsoft Office 2007: Introductory Concepts and Techniques25 Validation Rule Validation Text

26 Specifying a Default Value In Design View, select the field Click the Default Value property box then type =MED Microsoft Office 2007: Introductory Concepts and Techniques26 Default Value

27 Specifying a Collection of Allowable Values In Design View, select the field Click the Validation Rule property box to produce an insertion point and then type =MED or =DNT or =LAB Click the Validation Text property box and then type Must be MED, DNT, or LAB as the validation text Microsoft Office 2007: Introductory Concepts and Techniques27

28 Specifying a Format Format = the way the data displays in a field Format Symbol = a special symbol keyed in the Format property box > causes Access to display lc letters as caps < causes Access to display caps as lc letters Microsoft Office 2007: Introductory Concepts and Techniques28

29 Specifying a Format Microsoft Office 2007: Introductory Concepts and Techniques29 Format Value

30 Using a Lookup Field In Datasheet View, the “lookup field” will now contain a drop-down arrow to display the list of choices Click the arrow and choose from there Microsoft Office 2007: Introductory Concepts and Techniques30

31 Using a Lookup Field Microsoft Office 2007: Introductory Concepts and Techniques31 Lookup Arrow

32 Using a Multivalued Lookup Field In Datasheet View, click the drop-down arrow and click all choices that apply by clicking the check boxes Microsoft Office 2007: Introductory Concepts and Techniques32

33 Using a Multivalued Lookup Field Microsoft Office 2007: Introductory Concepts and Techniques33 More than one will appear in the same row

34 Resizing a Column in a Datasheet Just like in Excel, you can have Access “best fit” the data by double-clicking the right boundary of the field selector You can select more than one field before double-clicking to set more than one at a time Microsoft Office 2007: Introductory Concepts and Techniques34

35 Including Totals in a Datasheet In Datasheet View, click the Totals button on the Home tab Access will add a Total row to the Datasheet For each field you would like to display a total, choose a type of total from the drop down list of choices in the Total row Access has common totals like Avg, Sum, Count, etc. Microsoft Office 2007: Introductory Concepts and Techniques35

36 Including Totals in a Datasheet Microsoft Office 2007: Introductory Concepts and Techniques36 Total Row Drop down list for types of totals

37 Removing Totals from a Datasheet Click the Totals button again Microsoft Office 2007: Introductory Concepts and Techniques37

38 Changing Gridlines in a Datasheet Click the box in the upper-left corner of the Datasheet selector to select the entire datasheet Click the Gridlines button on the Home tab Choose the type of Gridlines you would like to display (Horizontal only, Vertical only, etc) Microsoft Office 2007: Introductory Concepts and Techniques38

39 Changing Gridlines in a Datasheet Microsoft Office 2007: Introductory Concepts and Techniques39

40 Changing the Colors in a Datasheet In Datasheet View, click the Alternate Fill/Back Color button arrow on the Home Tab Select a color as the alternate color You can also change the font color as well as the font, size, etc., using the Home tab Microsoft Office 2007: Introductory Concepts and Techniques40

41 Changing the Colors and Font in a Datasheet Microsoft Office 2007: Introductory Concepts and Techniques41

42 Querying a Multivalued Field Showing Multiple Values on Multiple Rows Normally, multiple values show on the SAME row To display on multiple rows, use the Field property In Design View, click the appropriate field then type a period and the word Value after the field name RUN the query Microsoft Office 2007: Introductory Concepts and Techniques42

43 Querying a Multivalued Field Showing Multiple Values on Multiple Rows Microsoft Office 2007: Introductory Concepts and Techniques43

44 Understanding Referential Integrity Referential Integrity = ensures that the value in one field must match that of the primary key in another table Example: The Recruiter Number in the Client table MUST match a Recruiter Number in the Recruiter table and the Recruiter Number MUST be the primary key in the Recruiter table This creates a one-to-many relationship: ONE record in the first table (Recruiter) relates to MANY records in the second table (Client) Microsoft Office 2007: Introductory Concepts and Techniques44

45 Setting Referential Integrity Click Database Tools on the Ribbon Click the Relationships button This opens the Relationships window Double-click the Recruiter table to Add the “one” table Double-click the Client table to Add the “many” table Microsoft Office 2007: Introductory Concepts and Techniques45

46 Setting Referential Integrity Drag the matching field from the table on the left side of the screen to the table on the right side Click the Enforce Referential Integrity check box Click the Cascade Update Related Fields check box Click the Create button to complete the creation of the relationship Access will now REJECT any number that does not match Microsoft Office 2007: Introductory Concepts and Techniques46

47 Specifying Referential Integrity Microsoft Office 2007: Introductory Concepts and Techniques47

48 Using a Subdatasheet Once you establish referential integrity, the datasheet will display a “plus sign” in front of a row(s) that has subdata Click the plus sign in front of the row to display the subdatasheet Microsoft Office 2007: Introductory Concepts and Techniques48

49 Using a Subdatasheet Microsoft Office 2007: Introductory Concepts and Techniques49 Sub- datasheet

50 Using the Sort Buttons Normally records in Datasheet view are sorted by the Primary key To change this sort, in Datasheet view, select the field to be sorted Click the correct sort button on the Home tab Microsoft Office 2007: Introductory Concepts and Techniques50

51 Backup and Recovery It is possible to damage or destroy a database The database may contain invalid data Recover = returning the database to its correct state A backup copy can be used as a recovery method Office Button Menu | Manage | Back Up Database Access names the backup file the same as the original but adds the date to the filename Microsoft Office 2007: Introductory Concepts and Techniques51

52 Compacting and Repairing Adding data causes the database to grow larger Deleting DOES NOT automatically give you back file space Compact = removing the wasted space Office Button menu | Manage | Compact and Repair Microsoft Office 2007: Introductory Concepts and Techniques52

53 Summary Add, change, and delete records Search for records Filter records Update a table design Format a datasheet Use action queries to update records 53Microsoft Office 2007: Introductory Concepts and Techniques

54 Summary Specify validation rules, default values, and formats Create and use single-valued and multivalued Lookup fields Specify referential integrity Use a subdatasheet Sort records Microsoft Office 2007: Introductory Concepts and Techniques54

55 Microsoft Office 2007 Access Chapter 3 Complete


Download ppt "Microsoft Office 2007 Access Chapter 3 Maintaining a Database."

Similar presentations


Ads by Google