Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Entity–attribute–value model wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Access wikipedia , lookup
Concurrency control wikipedia , lookup
Relational model wikipedia , lookup
Versant Object Database wikipedia , lookup
Clusterpoint wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
THE COMPLETE Microsoft Access 2003 MODULE 2 CompleteVISUALTM Step-by-step Series Computer Training Manual www.computertrainingmanual.com Microsoft Access 2003 Module 2 Copyright Notice Copyright 2003 EBook Publishing. All rights reserved. No part of this publication may be reproduced, transmitted, or translated into any language, in any form or by any means, electronically or mechanical, including photocopying, recording, storage in a database or retrieval system, or otherwise, without the prior written permission of EBook Publishing. Disclaimer We take great care to ensure the accuracy of these materials; however, EBook Publishing makes no warranty, express or implies, including without limitation any warranty concerning the adequacy, accuracy or completeness of such information or material or the results to be obtained from using such information or material. EBook Publishing reserves the right to revise this publication and to make changes in its content at any time, without obligation to notify any person or entity of such revisions or changes. Microsoft Access 2003 Module 2 HOW TO USE THIS MANUAL The CompleteVISUALTM step-by-step computer training manual is specially developed and organized based on the Instructional Design concepts, to ensure the effectiveness of the learning process. Most of the tasks in each chapter fit into a single page for easy reference. Most tasks are summarized to less than 10 key steps and accompanied by actual screen illustrations. Every step you go through is practical and relevant. All chapters are independent. No exercise files need to be installed prior to the training, so you can start training from the modules that best suit you or your trainees. However, the module sequence that we suggest is designed to optimize your computer learning process. Section name. Each section groups related chapters to make sure you learn all the related features and skills in complete details. Chapter name. Each chapter is an independent learning unit. No exercise files need to be installed prior to the training. This lets you start your training anywhere or anytime you like. Chapter introduction. Each chapter begins with a presentation and illustration to prepare you for the concepts you will learn. Microsoft Access 2003 Module 2 HOW TO USE THIS MANUAL Instructions Click File >> Save. Press <Shift>+<Tab> Type Photo from Kevin Jeff. You are asked to Click File to expand the file menu from the menu bar, then click the Save command from this menu. Hold down the Shift key while pressing the Tab key on the keyboard. Type the phrase Photo from Kevin Jeff. Handy summary. Each Task Name. Each task consists of a series of fully illustrated step-by-step instructions, which help you through the hands-on activities. task concludes with a summary that reinforces the key steps in the task. It also serves as a cue card for a specific task. Visual step-by-step instructions take you through hands-on activities to accomplish each task. These instructional actions appear in bold. The important commands or keywords are highlighted in this font and style. The text that you need to type in appears in this font and styles such. Detailed descriptions and explanations on each step help you to learn more about the step that you have just performed. Actual screen illustrations such as the dialog boxes and the result outcomes are displayed to show you how they appear on screen. This helps you to learn visually and effectively. Appropriate tips, tricks, and shortcuts that you may find useful are included to further enhance your skills. A rectangle or circle is used to draw your attention to the part of the illustration that you are dealing with. Microsoft Access 2003 Module 2 TABLE OF CONTENTS CREATING AND CUSTOMIZING QUERIES ................................................... 6 Creating Select Queries ............................................................................................................ 7 How To Create Queries Using The Wizard ........................................................................ 9 Controlling The Output Of A Query ....................................................................................... 11 How To Open / Switch A Query To Design View .............................................................. 12 How To Rearrange Query Fields ...................................................................................... 13 How To Delete A Field ...................................................................................................... 14 How To Add A Field .......................................................................................................... 15 How To Sort The Query Output ........................................................................................ 16 How To Filter The Query Output By Applying Criteria ...................................................... 17 How To Set Multiple Criteria ............................................................................................. 19 How To Hide A Field ......................................................................................................... 20 CREATING AND CUSTOMIZING FORMS .................................................... 21 Creating Forms Effectively ..................................................................................................... 22 How To Create A Form Quickly With AutoForm ............................................................... 24 How To Save And Rename A Form .................................................................................. 25 How To Create A Form Using The Form Wizard .............................................................. 26 Customizing Forms ................................................................................................................. 28 How To Open Form Design View ..................................................................................... 29 How to Show / Hide Field List ........................................................................................... 29 How to Show / Hide Toolbox ............................................................................................. 29 How To Resize A Control .................................................................................................. 30 How To Move Both A Control And Its Label ..................................................................... 31 How To Move A Control And Its Label Separately ........................................................... 32 How To Delete A Field Control ......................................................................................... 33 How To Add A Field Control ............................................................................................. 33 CREATING USEFUL REPORTS.................................................................... 34 Creating Reports ...................................................................................................................... 35 How To Create A Report Using AutoReport ..................................................................... 36 How To Create Mailing Labels .......................................................................................... 37 How To Set The Page Margins ......................................................................................... 40 How To Change The Page Orientation ............................................................................. 41 How To Number The Pages ............................................................................................ 42 MANAGING AND MAINTAINING A DATABASE ......................................... 43 Compacting and Repairing Database .................................................................................... 44 How To Compact and Repair A Database ........................................................................ 45 How Compact A Database Automatically ......................................................................... 46 Backing Up And Converting An Access Database .............................................................. 47 How To Backup A Database ............................................................................................. 47 How To Convert A Database To Access 2002/3 File Format ........................................... 48 2003 ComputerTrainingManual.com 5 Creating And Customizing Queries Objectives: When you have completed these lessons, you will be able to: Create Select Queries Open/switch a Query to design view Rearrange the output of a Query Add a field to a Query Delete a field in a Query Use Query Design view and Datasheet view Sort Queries Filter the output of a Query Set multiple criteria in a Query Hide Irrelevant Information 2003 ComputerTrainingManual.com 6 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES Creating Select Queries You use queries to retrieve information that you need from your database. Select Queries select the information you want from a source, which could be a table, a few tables, another queries or another few queries. If you need to get information from a few tables, all the tables should be related. Query Datasheet View (Query output). Query output lists the records with the information you specified in the query design. Query Design View. The top pane specifies the source tables/queries where the data is retrieved. The bottom pane specifies the information to be displayed. Source Table / Query Name Fields List Drag and drop the field to the design grid to place it into the query. Design Grid Determines the output of the query. 2003 ComputerTrainingManual.com 7 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES Before you start the lesson, create a new blank database and name it Training2. Then, import all the tables from the Northwind.mdb database. Depending on your setup, the Northwind database should be found in the C:\Programs Files\Microsoft Office\Office11\Samples folder. When you finish, the database contains the following tables. 2003 ComputerTrainingManual.com 8 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Create Queries Using The Wizard 1. From the Object Bar, click the Queries button. All queries should be displayed. However, there are no queries in the current database. SUMMARY 1. Click the Queries button. 2. Double-click Create query by using wizard from the list. 3. In the Tables/Queries box, select the table from the list. 4. Double-click the field names. 5. Click the Next button. 6. Click the Finish button. 2. In the queries list, double-click Create query by using wizard. The Simple Query Wizard appears. 3. In the Table/Queries box, click Table: Customers. You will retrieve the information from the Customers table. You can also retrieve information from another query instead of a table. The list of fields in the Customer table appears as shown below. 2003 ComputerTrainingManual.com 9 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES 4. In the Available Fields list box, double-click the CompanyName field. The CompanyName field information is now included in this query. Another way TIPS to add the field is to click the field name, and then click . If you want to select all the fields, click . If you want to deselect any field, click the field, and then click . If you want to deselect all fields, click . 5. Double-click ContactName, Country and Phone from the list. The fields are selected automatically when you double-click the field name. To select all, click 6. . Click the Next button. Click the Finish button. You can change the query name after you click the Next button. The query opens, as shown below. 2003 ComputerTrainingManual.com 10 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES Controlling The Output Of A Query You are able to control the way the query list, the records, even after you have created the query. You can sort any fields from the list in ascending in ascending or descending order. You can add or delete any fields. You can also show only selected records that meet your criteria. Sometimes, you may need a field to filter the records but do not wish to show the details in the query output; then you can hide the field as you wish. Query Design View. Specifies the records to be displayed by the query. Query Design Grid. Specifies the columns of information to be displayed by the query. Sort Field Show/Hide Field Criteria Query Datasheet View. The records are displayed as you specified. 2003 ComputerTrainingManual.com 11 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Open / Switch A Query To Design View 1. Select Customers Query from the Database Window. Make sure you are in the Queries view. 2. Click the Design button. The design of the query is displayed as shown below. SUMMARY 1. Select the query from the Database Window. 2. Click the Design button. TIPS If the query is already open in datasheet view, click the Design view button on the Database toolbar to switch to design view. 2003 ComputerTrainingManual.com 12 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Rearrange Query Fields 1. Click the column heading button for the Phone field. The pointer changes to a blank arrow. The whole field is highlighted. SUMMARY 1. Open the query in Design view. 2. Click the column heading button for the field you want to move. 3. Drag the column heading to the new location. 4. Release the mouse. 2. Drag the column heading to the left. A thick line appears to show the new location of the field. TIPS If you want to see the records list, click the Datasheet view button on the Database toolbar. 3. Release the mouse. The Phone field is moved to the left of the Country field. 2003 ComputerTrainingManual.com 13 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Delete A Field 1. Select the Phone field. Click the column heading for Phone to select the field. SUMMARY 1. Open the query in Design view. 2. Click the column heading button to select the field. 3. Press <Delete>. TIPS 2. Press <Delete>. The Phone field is deleted as shown below. You can also delete multiple fields. Simply select the fields, and then press <Delete>. 2003 ComputerTrainingManual.com 14 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Add A Field 1. Click the Phone field from the Customers table field list. If you need to add a field from another table. Click the Show Table button on the Database toolbar to include the table in this query. SUMMARY 1. Open the query in design view. 2. Drag the field from the table field list to the grid below. 3. Release the mouse. . 2. TIPS Drag the Phone field down to arrange it in the fourth column. A small rectangle box appears to indicate the location of the field. If you need to add a field from another table. Click the Show Table button on the Database toolbar to include the table in this query. 3. Release the mouse. The field is added and displayed in the query. 2003 ComputerTrainingManual.com 15 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Sort The Query Output If you open the Customers Query in datasheet view, you will see that the query sorts the fields from the left to the right, as shown below. SUMMARY 1. Open the query in Dsign view. 2. Click the Sort dropdown arrow for the field you want to sort. 3. Click the sort option you want from the list. 1. Ascending: Sorts A to Z, 1 to 9. For the ContactName field, click the Sort drop-down arrow. A list of sort options appears. Descending: Sorts Z to A, 9 to 1. TIPS You can click the Datasheet View button or Run button to show the records. 2. Click Ascending from the list. The new output will be sorted by the ContactName field, instead of the CompanyName field. 3. Click the Datasheet button to see the output. The output appears as shown below. Click the Design view button if you want to change the design of the query. 2003 ComputerTrainingManual.com 16 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Filter The Query Output By Applying Criteria You can filter the output to show only records that meet specific criteria such as listing only customers from the UK. 1. For the Country field, in the Criteria row, type UK. You will show records of customers from the UK. SUMMARY 1. Open the query in design view. 2. Type the criteria in the Criteria row for the field you want to filter. 2. Display the query in Datasheet View. Only customers from the UK are displayed. 3. Display the query in Design View again Notice that Access automatically inserts quotation marks (“ “) around UK because UK is a text string. If it is a number, no quotation marks are needed. 2003 ComputerTrainingManual.com 17 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES More Criteria Examples Of Criteria Data Type Criteria Query Results Number 200 <200 >=200 <>200 In(200,250) Between 150 And 200 Find the number 200. Find numbers less than 200. Find numbers more than or equal to 200. Find numbers not equal to 200. Find numbers 200 and 250. Find numbers from 150 to 200. Text UK >=U U* In(UK,USA) Between B And E Find the exact text UK. Find text starting with U to Z. Find text starting with U. Find the text UK or USA. Find text starting with letter B to D and text equal to E. Date 3/3/2003 <3/3/2003 In(#2/2/2003#,#3/3/2003#) Between 2/2/2003 And 3/3/2003 Find the date 3/3/2003. Find dates before 3/3/2003 Find dates 2/2/2003 and 3/3/2003. Find dates on and between 2/2/2003 and 3/3/2003. Any Field Is Null Is Not Null Find records that do not contain data in this field. Find records that contain data in this field 2003 ComputerTrainingManual.com 18 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Set Multiple Criteria 1. Open the Customers Query query in Design view. For the Country field, on the or row, type USA. When you set criteria on different rows, the criteria is set to the OR condition, meaning the Country could be either the UK or the USA. SUMMARY 1. Open the query in Design view. 2. Type the criteria on different rows for the OR condition. 3. Type criteria on the same row for the AND condition. 2. Switch to the Datasheet View. All the customers from the UK or USA are displayed. 3. Switch to the Design View. Delete the criteria USA. In the ContactName field column, type <J on the same row as the UK criteria. When criteria appears on the same row, the criteria is set to the AND condition, meaning the records must meet both the criteria ContactName <J and Country =UK. 4. Switch to the Datasheet View. All the UK customers with ContactName <J are displayed. 2003 ComputerTrainingManual.com 19 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING QUERIES How To Hide A Field 1. Open Customers Query query in Design view. Under the Country field, click the Show box to uncheck it. Since the list shows all customers from UK, it is redundant to show the country field in the query result. SUMMARY 1. Open the query in Design view. 2. Click the Show box to uncheck the option for the field you want to hide. 2. Switch to the Datasheet View. The country field does not appear. 2003 ComputerTrainingManual.com 20 Creating And Customizing Forms Objectives: When you have completed these lessons, you will be able to: Create Forms quickly with AutoForm Save and rename a Form Create a Form using the Form Wizard Open Form Design view Show/Hide a Field list Show/Hide the Toolbox Resize a control in a Form Move controls and labels Delete a field control Add a field control 2001 ComputerTrainingManual.com 21 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS Creating Forms Effectively A Form is an interface that lets you view information from tables or queries. You also use forms to enter data into tables. Forms make your database easy to use and view. You can arrange all the information in a record to be displayed on a single screen whereas if you read it directly from the table datasheet you have to scroll the screen. You are able to customize your form so you can view the data quickly and effectively. Form displays OLE object fields like photos but this data is not visible in table datasheet view. Forms enable you to retrieve data from multiple tables or queries. You can also enter data into multiple tables using a form. Your database users will no longer need to search for the appropriate tables to view or enter the information. Table Datasheet View. Displays records directly from table datasheet. Form View. Displaying records in the form makes your database easier to use and view. 2001 ComputerTrainingManual.com 22 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS If you did not create the Training2 file in the previous lesson, you will need to create a new database and name it Training2. Then, import all the tables from Northwind.mdb. Depending on your setup, the Northwind database should be in the C:\Programs Files\Microsoft Office\Office11\Samples folder. 2001 ComputerTrainingManual.com 23 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Create A Form Quickly With AutoForm 1. From the Object Bar, click the Forms button. All forms should be displayed. However, there are no forms in the current database. SUMMARY 1. From the Object Bar, click the Forms button. 2. Click the . New button. 3. Click AutoForm: Columnar from the list. 4. Choose the table or query where the object’s data comes from. 2. Click the New button. The New Form dialog box appears. 3. Click AutoForm: Columnar from the list and select the Categories table. The form will include all the fields from the Categories table. 4. Click the OK button. The form is created and displayed in Form view. 2001 ComputerTrainingManual.com 24 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Save And Rename A Form 1. Click the Save button on the Database toolbar. The Save As dialog box appears. SUMMARY How to save a Form: 1. Click the Save button on the Database toolbar. 2. Click the OK button. 2. The form is saved with the default name. Type in another name if you want to before you click the OK button. 3. How to rename a Form: 1. Right-click the Form name from the database Window. 2. Click Rename from the shortcut menu. 3. Type the new form name. 4. Press <Enter>. Click the OK button. Click the Close button to close the form. The new form appears in the Database Window. 4. Right-click the form name. Click Rename from the shortcut menu. The form is created and displayed in Form view. 5. Type Product Categories. Then, press <Enter>. The form is renamed as shown below. 2001 ComputerTrainingManual.com 25 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Create A Form Using The Form Wizard 1. From the Object Bar, click the Forms button. Doubleclick Create form by using wizard. The form wizard dialog box appears. SUMMARY 1. From the Object Bar, click the Forms button. 2. Double-click Create form by using wizard. 3. In the Table/Queries box, select the table you want to use. 2. In the Table/Queries box, click the Employees table. The Employees table fields are displayed. 4. Click to set all the fields into the form. 5. Click the Next button and select the form layout. 6. Click the Next button and select the form style. 7. Click the Next button and type in the form name. 8. Click the Finish button. 3. Click to insert all the fields into the new form. All the fields are sent into the Selected Fields box. 4. Click the Next button. A dialog box appears to determine the layout of your form. 2001 ComputerTrainingManual.com 26 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS 5. Click the Columnar layout. If you wish to try other layouts, you can see the layout previews on the left. 6. Click the Next button. Click the Industrial style. A dialog box appears to determine the style of your form. 7. Click the Next button. Type All Employees as the form name. The default name is the table name: Employees. 8. Select the Open the form to view or enter information option. Then, click the Finish button. The All Employees form is displayed. 2001 ComputerTrainingManual.com 27 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS Customizing Forms You are able to change the design of the form. You can delete the existing controls (we refer to fields as controls on a form), add, move or resize the controls. In order to customize or change the form design, you have to open it in the Form Design view. Form Design View. Shows you the parts of the form that you can customize. Show Field List button Click to show/hide Field List. Show Toolbox button Click to show/hide Toolbox. Data Source Table Name Field List Shows all fields in data source table. Drag and drop the field to place onto form. Toolbox Shows tools to design your form. Control Object that contains data or run actions. A Field is known as a control on a form. 2001 ComputerTrainingManual.com 28 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Open Form Design View 1. Select the All Employees form from the Database Window. Make sure you are in Form view. 2. Click the Design button. The design of the form is opened as shown below. SUMMARY 1. Select the form from the Database Window. 2. Click the Design button. 3. Click the Field List button to display the Field List. 4. Click the Toolbox button to display the Toolbox. . TIPS If the form is already open in Form view, click the Design view button on the Database toolbar to switch to Design View. How to Show / Hide Field List 3. How to Show / Hide Toolbox 4. Click the Field List button to display the Field List. This is a toggle button. Clicking the button again will hide the Field List. Click the Toolbox button to display the Toolbox. This is a toggle button. Clicking the button again will hide the Toolbox. 2001 ComputerTrainingManual.com 29 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Resize A Control 1. Open the All Employees form in Design View. 2. Click the Notes control. Resize handles appear around the Notes control. SUMMARY 3. Drag the bottom Resize Handle up. The bottom resize handle is shown below. 1. Open form in Design View. 2. Click the control. 3. Drag the resize handle to adjust the size. The mouse pointer changes to 4. when it is positioned at the resize handle. Release the mouse. The control is resized. 2001 ComputerTrainingManual.com 30 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Move Both A Control And Its Label 1. Open the All Employees form in Design View. 2. Click the Reports To control. Make sure you are in Design View. 3. SUMMARY Position the mouse pointer over the border of the control. The pointer changes to as shown below. 1. Open the form in Design View. 2. Click the control. 3. Position the mouse pointer over the border of the control. 4. Drag the control to the new location. 5. Release the mouse. 4. Drag the control up. A thin line appears to indicate the new location for the label and the control. 5. Release the mouse. Both the control and the label are relocated. 2001 ComputerTrainingManual.com 31 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Move A Control And Its Label Separately 1. Position the mouse at the upper left handle of the control. You wish to move only the control, but not the label. This handle determines the position of the control while the handle on the upper left of the label determines the label position. The pointer changes to when it is positioned at this handle. SUMMARY 1. Open the form in Design View. 2. Click the control. 3. Position the mouse on the upper left handle of the control. 4. Drag the handle. 5. Release the mouse. 2. Drag the control down to the left. A thin line appears to indicate the new position for the control 3. Release the mouse. The control is relocated. 2001 ComputerTrainingManual.com 32 Microsoft Access 2003 Module 2 CREATING AND CUSTOMIZING FORMS How To Delete A Field Control 1. Open the All Employees form in Design View. 2. Click the Report To control. You want to delete the Report To control. SUMMARY 3. Press <Delete>. The control is now deleted. 1. Open the form in Design View. 2. Click the control. 3. Press <Delete>. How To Add A Field Control 1. From the Field List box, click the Report To field. Click to show Field List if it does not appear on the screen. 2. Drag the Report To field from the Field List to the form. To drag multiple fields, select the fields while pressing the <Ctrl> key before dragging them into the form. SUMMARY 1. From the Field List box, drag the control onto the form. 2. Release the mouse. 3. Release the mouse. The field is added onto the form. 2001 ComputerTrainingManual.com 33 Creating Useful Reports Objectives: When you have completed these lessons, you will be able to: Create Reports using AutoReport Create mailing labels Set the page margins Change the page orientation Number pages 2003 ComputerTrainingManual.com 34 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS Creating Reports A Report is one of the types of output of your database. Although you can print the records directly from a table, as a query or a form, reports may be used to produce a more flexible and professional hard copy output. You can customize the format or layout of the report. You can also use a report to produce a calculation, group data, summarize and produce an analysis of the data in your database. You can group data to better organize it for analysis. For example, you may want to group the total sales by each sales person so that you can compare their performance. For a visual reference, you can produce a chart report. Reports can source data from a table, multiple tables or a query. If the report uses data from more than one table, the tables must be related. 2003 ComputerTrainingManual.com 35 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS How To Create A Report Using AutoReport 1. From the Object Bar, click the Reports button. Create a new blank database. The Task Pane appears. 2. Click the New button. The New Report dialog box appears. SUMMARY 3. From the list, click AutoReport: Tabular. Click the Customers table from the table/query box. The report will include all the fields from the Customers table. 1. From the Object Bar, click the Reports button. 2. Click the . New button. 3. Select the new report option from the list. 4. Select the data source table or query. 5. Click the OK button. 6. Click the Close button to close the print preview. 7. Click the Save button. 4. Click the OK button. The report is created and displayed in Report Print Preview. 5. Click the Close button to close the print preview. Then, click the Save button to save the report. The default report name is Customers. 2003 ComputerTrainingManual.com 36 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS How To Create Mailing Labels 1. From the Object Bar, click the Reports button. Create a new blank database. The Task Pane appears. 2. Click the New button. The New Report dialog box appears. SUMMARY 3. 1. From the Object Bar, click the Reports button. 2. Click the . New button. 3. Click Label Wizard and select the data source table or query. 4. Click the OK button and select a label size you like. 5. Click the Next button and choose the text font and color for the label. 6. Click the Next button and select the fields to be included in the label. 7. Click the Next button and select which field you would like to sort by. 8. Click the Next button and type the name for the report. 9. Click the Finish button. From the list, click Label Wizard. Click the Customers table from the table/query box. The mailing labels will get data from the Customers table. 4. Click the OK button. Click the J8360 product number. In the Filter by manufacturer box, click Avery. The Label Wizard appears. Choose the label standard that you will use to print this label. 2003 ComputerTrainingManual.com 37 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS 5. Click the Next button. The next dialog box lets you choose the text font and color for the label. 6. Click the Next button. Click the CompanyName field and click . Then press <Enter>. The next dialog box lets you determine what you would like on your label. The CompanyName data is placed into the label. 7. Select the other required fields and continue creating the prototype label as shown below. Press <Enter> to go to the next line. Press <Spacebar> to leave a space after PostalCode. You need to type `Attn:’ before you include the ContactName field. 2003 ComputerTrainingManual.com 38 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS 8. Click the Next button. Click the Region field and then click . The printout of the label is sorted by region. 9. Click the Next button. Click the Finish button. Type in the label name if you want to name the report other than the default, Labels Customers. The labels are created and displayed in the print preview as shown below. 2003 ComputerTrainingManual.com 39 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS How To Set The Page Margins 1. Double-click to preview the Customers report. The report is opened in print preview. This report was created in a previous lesson. SUMMARY 1. Preview the report. 2. Click File >> Page Setup. 3. Change the margin number. 4. Click the OK button. . 2. From the menu, click File >> Page Setup. In the Bottom box, type 2. The Page setup dialog box appears. 3. Click the OK button. The bottom margin is increased as shown below. 2003 ComputerTrainingManual.com 40 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS How To Change The Page Orientation 1. Preview the Customers report. The report is opened in print preview. 2. Click the Setup button. The Page Setup dialog box appears. 3. 1. Preview the report. 2. Click the Setup button. 3. Click the Page tab. 4. Under Orientation, select the appropriate orientation option. 5. Click the OK button. Click the Page tab. The Page tab appears. SUMMARY 4. Click the Portrait option button. 5. Click the OK button. TIPS You can also change the paper size here in the Page Setup dialog box. The page is printed in portrait orientation. 2003 ComputerTrainingManual.com 41 Microsoft Access 2003 Module 2 CREATING USEFUL REPORTS How To Number The Pages 1. Click the Customers report in the Database Window. The Table design is shown. 2. Click the Design View button. The Report Design view opens as shown below. It looks similar to a Form design. You can change the layout of the report by moving and resizing the controls in the report like you did in form design. SUMMARY 1. Open the report in Design View. 2. Click Insert >> Page Numbers. 3. Under Format, select the format style you want. 4. Under Position, select the option. 5. In the Alignment box, select the option you want from the list. 6. Click the OK button. 3. From the menu, click Insert >> Page Numbers. The Page Numbers dialog box appears. TIPS If you want to switch to Report Design view when the report is being previewed, click 4. Under Format, click the Page N of M option button. Under Position, click the Bottom of Page option button. N is the page number. M is the total pages. the Design button on the Standard toolbar. You can use the same method shown here to insert a date and time in your report. 5. Click the OK button. The page numbering control appears in Report Design View. Click the Preview button to preview the report with the page numbering shown. 2003 ComputerTrainingManual.com 42 Managing And Maintaining A Database Objectives: When you have completed these lessons, you will be able to: Compact a database Repair a database Backup a database Convert the file format of an old database 2003 ComputerTrainingManual.com 43 Microsoft Access 2003 Module 2 MANAGING AND MAINTAINING A DATABASE Compacting and Repairing Database From time to time, you should compact and repair your Microsoft Access files to ensure optimal performance. Access provides useful and easy to use database management tools such as Compacting Database and Repairing Database feature. If a serious problem occurs while you are working in an Access file and Access attempts to recover it, you might receive a message that the repair operation was cancelled and that you should compact and repair the file. Compacting Database. When you delete records or objects from a database, Access leaves white space in the database. From time to time, you should compact your database to reduce the database file size and enhance database performance. Repairing Database. Errors might occur in database due to unforeseen circumstances such as a sudden power failure. These errors are minor and could be repair easily by Access Repairing command. 2003 ComputerTrainingManual.com 44 Microsoft Access 2003 Module 2 MANAGING AND MAINTAINING A DATABASE How To Compact and Repair A Database 1. From the menu, click Tools >> Database Utilities >> Compact and Repair Database. The Database to Compact From dialog box appears. SUMMARY 1. Click Tools >> Database Utilities >> Compact and Repair Database. 2. Select the database name. 3. Click the Compact button. TIPS You do not need to select the database if the database is currently open. The compact and repair database functions are carried out at the same time in Access 2003. 2. Click Training2 from the list. The Page Numbers dialog box appears. 3. Click the Compact button. The database is compacted and repaired. 2003 ComputerTrainingManual.com 45 Microsoft Access 2003 Module 2 MANAGING AND MAINTAINING A DATABASE How Compact A Database Automatically 1. Open the Training2 database. This is the database that you want to compact and repair automatically. 2. From the menu, click Tools >> Options. The Options dialog box appears. 3. The General options are displayed. SUMMARY 1. Open the database. 2. Click Tools >> Options. 3. Click the General tab. 4. Check Compact on Close check box. 5. Click the OK button Click the General tab. 4. Click the Compact on Close check box. The database will be compacted automatically every time you close the database. TIPS Compacting does not occur if you close a shared Access database while another user has it open. 5. Click the OK button. 2003 ComputerTrainingManual.com 46 Microsoft Access 2003 Module 2 MANAGING AND MAINTAINING A DATABASE Backing Up And Converting An Access Database You might be using old Access database created in Access 97 or Access 2000. To optimize the usage of the database, you should convert the old database format to Access 2003. Access will create a new database file in Access 2003 File Format. How To Backup A Database 1. Open the database which you want to backup. From the menu, click File >> Back Up Database. If the database is open, close all the objects before you backup the database. The Save Backup As dialog box appears. SUMMARY 1. Open the database which you want to backup. 2. Click File >> Back Up Database. 3. In the File name box, type in the backup file name. 4. Click the Save button. 2. In the File name box, type Training2 backup. If you want to save the backup in another folder, specify the folder name in the Save in box. 3. Click the Save button. The backup database is saved. 2003 ComputerTrainingManual.com 47 Microsoft Access 2003 Module 2 MANAGING AND MAINTAINING A DATABASE How To Convert A Database To Access 2002/3 File Format 1. Open the old version of the database. For example, you may want to open an Access database created in Access 2000. 2. From the menu, click Tools >> Database Utilities >> Convert Database >> To Access 2002 – 2003 File Format. The Convert Database Info dialog box appears. SUMMARY 1. Open the old Access database. 2. Click Tools >> Database Utilities >> Convert Database >> To Access 2002 – 2003 File Format. 3. In the File name box, enter the database name. 4. Click the Save button. TIPS You can also convert the database without opening it. For safety purposes, you should make a backup copy of the database before you convert the database for safety purpose. 3. In the File name box, type Training2 New Format. 4. Click the Save button. Use a new file name because you can’t replace the existing file. If you wish to use the same file name, save it in another location. The database is converted. . 2003 ComputerTrainingManual.com 48