PROCEDURES LESSON 8: MANAGING RELATIONSHIPS BETWEEN TABLES Renaming a Table 1 In the Navigation pane, right-click the table you want to rename 2 On the shortcut menu, click Rename 3 Type the new table name and press Enter Relating Tables 1 Close any open objects and click the DATABASE TOOLS tab Relationships Group 2 Click the Relationships 3 Drag the tables for the relationship from the Navigation pane to the Relationships grid 4 Drag the desired field between tables to set up the relationship 5 In the Edit Relationships dialog box, click Create Showing Additional Tables 1 Close any open objects and click the DATABASE TOOLS tab Relationships Group 2 Click the Show Table button 3 In the Show Table dialog box, click the table you want to add 4 Click Add Creating a New Relationship with Referential Integrity 1 Close any open objects and click the DATABASE TOOLS tab Relationships Group 2 Click the Relationships 3 Drag the tables between which you want to create the relationships to the Relationships grid 4 Drag the desired field between tables to set up the relationship 5 In the Edit Relationships dialog box, click to mark the Enforce Referential Integrity, Cascade Update Related Fields, and Cascade Delete Related Records check boxes 6 Click Create Modifying an Existing Relationship to Enforce Referential Integrity 1 Close any open objects and click the DATABASE TOOLS tab Relationships Group 2 Click the Relationships 3 In the Relationships grid, double-click the connector line of the relationship you want to modify 4 In the Edit Relationships dialog box, click to mark the Enforce Referential Integrity, Cascade Update Related Fields, and Cascade Delete Related Records check boxes 5 Click OK Deleting a Relationship 1 With the Relationships grid displayed, click the connector line of the relationship you want to delete 2 Press Delete 3 Click Yes to confirm the deletion Showing Related Records 1 Open the desired table in Datasheet 2 Click the plus sign to the left of the desired record to show its related records 3 Click the minus sign to close the subdatasheet of related records Changing the Subdatasheet 1 With the table open in HOME tab Records Group 2 Click the More 3 Click Subdatasheet, and then click Subdatasheet again 4 In the Insert Subdatasheet dialog box, select the desired Subdatasheet 5 Click OK 1
Printing a Relationship Report 1 With the database open, click the DATABASE TOOLS tab Relationships Group 2 Click the Relationships 3 If necessary, arrange the table windows as desired 4 Click the RELATIONSHIPS TOOLS DESIGN tab Tools Group 5 Click the Relationship Report 6 On the PRINT PREVIEW tab, click the Print button 7 In the Print dialog box, set the print options as desired 8 Click OK 2
LESSON 9: FINDING, REPLACING, AND SORTING DATA Finding Data 1 With the table open in HOME tab Find Group 2 Click the Find 3 In the Find and Replace dialog box, type the text you want to find in the Find What box 4 Set the Look In, Match, and Search options as desired 5 Click Find Next Replacing Data 1 With the table open in HOME tab Find Group 2 Click the Replace button 3 In the Find and Replace dialog box, type the text you want to find in the Find What box 4 Type the replacement text in the Replace With box 5 Set the Look In, Match, and Search options as desired 6 Click Find Next 7 Replace found text as desired Searching with Wildcards 1 With the table open in HOME tab Find Group 2 Click the Find 3 In the Find and Replace dialog box, enter the desired search string, including wildcard character(s), in the Find What box 4 Set the Look In, Match, and Search options as desired 5 Click Find Next Sorting Records in a Table 1 With the table open in Datasheet view, click in the field by which you want to sort the records 2 Click the HOME tab 3 Click the Ascending button to sort in ascending order or the Descending button to sort in descending order Removing a Sort 1 Click the HOME tab 2 Click the Remove Sort Sorting Using Multiple Fields 1 With the table open in Datasheet view, arrange the fields in the order you want to sort them so they are adjacent to each other 2 Select the fields by which you want to sort 3 Click the HOME tab 4 Click the Ascending button to sort in ascending order or the Descending button to sort in descending order 3
LESSON 10: FILTERING DATA Filtering by Selection 1 With the table open in Datasheet view, select the field value for which you want to filter 2 Click the HOME tab 3 Click the Selection button 4 On the menu, click the desired filter option Removing a Filter 1 Click the HOME tab 2 Click the Toggle Filter Filtering for Multiple Values 1 With the table open in Datasheet view, right-click any value in the field for which you want to filter 2 On the menu, click the desired filter option 3 On the submenu, click the desired filter Filtering by Form 1 With the table open in HOME tab 2 Click the Advanced button 3 On the menu, click Filter by Form 4 In the form, set filter options as desired 5 Click the Toggle Filter Saving a Filter As a Query 1 With the table open in HOME tab 2 Click the Advanced button 3 On the menu, click Filter by Form 4 In the form, set filter options as desired 5 Click the Toggle Filter 6 Click the HOME tab 7 Click the Advanced button 8 On the menu, click Save As Query 9 In the Save As Query dialog box, type the name of the query in the Query Name box 10 Click OK 4
LESSON 11: CREATING A QUERY IN DESIGN VIEW Creating a New Select Query in Design View 1 In the database window, click the CREATE tab Queries Group 2 Click the Query Design 3 In the Show Table dialog box, click the table or query on which the new query will be based 4 Click Add Adding Fields to a Query 1 In Query Design view, drag fields from the table window to the grid as desired OR OR Click in the Field row in the query grid, click the dropdown arrow, and click the field to add Double-click a field in the table field list to add it to the grid Removing Fields from the Query 1 In the query grid, click anywhere in the field s column that you want to remove OR In the query grid, click on the thin gray bar above the desired field to select the column 2 Click the QUERY TOOLS DESIGN tab Query Setup Group 3 Click the Delete Columns Running a Query 1 In Query Design view, click the QUERY TOOLS DESIGN tab Results Group 2 Click the Run Saving and Printing a Query Saving a Query 1 In Query Design view, click the Save button on the Quick Access Toolbar 2 In the Save As dialog box, type the query name 3 Click OK Printing a Query 1 With the query open in Datasheet view, click FILE 2 Click Print 3 Click the Print 4 In the Print dialog box, set the print options as desired 5 Click OK 5
LESSON 12: CREATING A MULTI-TABLE QUERY Creating a Multi- Table Query 1 In the database window, click the CREATE tab Queries Group 2 Click the Query Design 3 In the Show Table dialog box, double-click the tables on which the new query will be based 4 Drag fields from the table windows to the grid as desired Sorting Query Results Sort row for the field on which you want to sort 3 Click the drop-down arrow and click Ascending or Descending Reordering Fields in a Query 2 In the query grid, click the gray bar above the field you want to move 3 Drag the field to the desired location Using All Fields of a Table 1 In the database window, click the CREATE tab Queries Group 2 Click the Query Design 3 In the Show Table dialog box, double-click the table on which the new query will be based 4 In the table window, doubleclick the asterisk (*) at the top of the table field list Changing a Column Name Field row of the column you want to rename 3 Position the insertion point to the left of the current field name 4 Type the new name followed by a colon Saving a Query with a Different Name 1 Open the query in either Design view or Datasheet 2 Click FILE 3 Click Save As 4 Click Save Object As 5 Click Save As 6 In the Save As dialog box, type the new name 7 Click OK 6
LESSON 13: USING CRITERIA IN A QUERY Specifying Criteria in a Query field 3 Type the criteria as desired Filtering by an Undisplayed Field field 3 Type the criteria as desired 4 Click the field s Show box to deselect it Filtering for Null Values field 3 Type Is Null Changing a Query to a Make Table Query 2 Click the QUERY TOOLS DESIGN tab Query Type Group 3 Click the Make Table button 4 In the Make Table dialog box, enter the table name 5 Click OK 7
LESSON 14: USING COMPARISON OPERATORS Using a Comparison Operator in a Query field 3 Type the criteria with comparison operator as desired Using Wildcards and the Like Operator in a Query Using Wildcards in a Query field 3 Type the criteria, using the asterisk (*) wildcard character to specify any number of characters, or the question mark (?) wildcard character to specify a single character Using the Like Operator in a Query field 3 Type Like, followed by the criteria as desired Using the Between And Operator in a Query field 3 Type the criteria in the format, Between criteria and criteria Using the In Operator in a Query field 3 Type the criteria in the format, In (criteria) Using the Or Operator in a Query field 3 Type the criteria in the format, criteria Or criteria 8
LESSON 15: USING CALCULATED FIELDS Creating a Calculated Field in a Table 1 Open the table in Design 2 Add a blank field that will hold the calculated data where desired 3 Click the Data Type dropdown arrow and click Calculated 4 In the Expression Builder, select from the Expression Elements, Expression Categories, and Expression Values as desired 5 Click OK Using Calculated Fields in a Query 2 In the query grid, click in a blank column and type the field name followed by a colon (:) 3 Click the QUERY TOOLS DESIGN tab Query Setup Group 4 Click the Builder button 5 In the Expression Builder, select from the Expression Elements, Expression Categories, and Expression Values as desired 6 If necessary, delete the Expr text 7 Click OK 9
LESSON 16: SUMMARIZING DATA IN QUERIES Summarizing with the Simple Query Wizard 1 In the database window, click the CREATE tab Queries Group 2 Click the Query Wizard 3 In the New Query dialog box, click Simple Query Wizard 4 Click OK 5 In the Simple Query Wizard dialog box, click the Tables/Queries drop-down arrow 6 Click the table or query on which the query will be based 7 Select fields from the Available Fields list box to move to the Selected Fields list box 8 Click Next 9 Click Summary, and then click Summary Options 10 In the Summary Options dialog box, click the options as desired 11 Click OK 12 Click Next 13 Enter the desired title for the query 14 Click Finish Summarizing Data in Query Design View 2 Click the QUERY TOOLS DESIGN tab Show/Hide Group 3 Click the Totals 4 In the query grid, click the Total row for the field whose values you want to summarize 5 Click the drop-down arrow and click the desired summary option Using the Crosstab Query Type 2 Click the QUERY TOOLS DESIGN tab Query Type Group 3 Click the Crosstab button 4 In the query grid, click the Crosstab drop-down arrow to specify the desired row heading, column heading, and value 10