Access intro
Upcoming SlideShare
Loading in...5
×
 

Access intro

on

  • 625 views

Computer:))

Computer:))

Statistics

Views

Total Views
625
Views on SlideShare
625
Embed Views
0

Actions

Likes
0
Downloads
26
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Access intro Access intro Document Transcript

  • Microsoft Access 2003 (iTech Professional Enhancement Training) Wesley Lance Blackwell iTech Training Coordinator Wesley.Blackwell@usm.edu March 14, 2005
  • Documentation OutlineIntroduction …………………………………………………………………... 3Learning Objectives ………………………………………………………….. 3What is Access? ……………………………………………………………… 3Access Definitions …………………………………………………………… 3Planning To Use Access ……………………………………………………… 3Examples of Table design …………………………………………………….. 4Access Walk Through - Open Microsoft Access …………………………………………………. 5 - Database Objects ……………………………………………………. 5 - Design Wizards ………………………………………………………….. 5 - Tables …………………………………………………………………… 5 - Table Diagram …………………………………………………………… 6 - Navigational Aids ……………………………………………………….. 6 - Table – DESIGN VIEW …………………………………………………. 7 - Data Types & Example data …………………………………………….. 7 - Forms ……………………………………………………………………. 8 - Form Diagram …………………………………………………………… 8 - Form – DESIGN VIEW …………………………………………………. 8 - Queries ………………………………………………………………….. 9 - Query Diagram ………………………………………………………….. 9 - Query – DESIGN VIEW ……………………………………………….. 9 - Reports …………………………………………………………………… 10 - Report Diagram ………………………………………………………….. 10 - Report – DESIGN VIEW ………………………………………….. 10Exercises 1. Creating Simple Tables a. Creating Tables using the Wizard ………………………… 11 b. Creating Tables Manually ………………………………… 15 c. Enter Data Into Tables Manually …………………………. 17 2. Creating Simple Forms a. Creating Forms using the Wizard ………………………… 19 b. Creating Forms Automatically …………………………… 23 c. Enter Data Into Tables Using Forms ……………………… 26 3. Creating Queries a. Creating Queries using the Wizard & One Table …………. 29 b. Creating Queries using multiple tables ……………………. 31 4. Creating Reports a. Creating Reports using Wizard …………………………… 35 b. Creating Reports using an Automatic Process ……………. 39 5. Importing Excel Spreadsheets a. Import Spreadsheet using Wizard ………………………… 41 b. Created Query & Report from Imported Table …………… 46Access Components Review ………………………………………………….. 50 iTech Professional Enhancement Training 2
  • Introduction: This workshop consists of lecture as well as hands-on training for theMicrosoft Access database application. Participants will gained basic skills in startingAccess, creating database tables, building forms for data entry, running queries within thedatabase environment, as well as creating reports for the data obtained from the queries.Participants are required to have basic computing skills prior to attending this trainingsession.Learning Objectives • Database terminology and principles • Planning and designing a database • Create simple database and objects • Table • Form • Queries • ReportsWhat is Access anyway? • A program produced by Microsoft that enables users to organize information into lists • Allows user to store, find, extract (or filter) portions, analyze, print, manage, and share large amounts of data • Powerful relational database (“RDB”) management systemAccess Definitions • Database - collection of information organized into a list • Relational Database - divides information into discrete groups (tables) which can then be related to each other using a common “key” or identifier • Object - method of input or output to enter, view, or manipulate the data in a databasePlanning To Use Access • Identify the purpose • How will I use this? • What reports and lists do I need to produce? • What data do I need to collect? • Break the information into discreet pieces • Determine fields (columns) and what type of data will be inserted • Use multiple tables (each with fields related to a specific subject) to avoid redundancy • Determine the relationship between tables • Sketch a diagram or outline first • Anticipate future (International? Zip code extensions, etc.) iTech Professional Enhancement Training 3
  • Examples of Table design: These are examples of different table designs, and it isimportant that you design your tables correctly so to utilize the full functions of Access.Name AddressJohn Smith 408 W. Park, Lincoln, NE 68522Angie Johnson 100 E. Central, Minneapolis, MN 55413George Ecks 501 3rd Street, Houston, TX 77338Bad Table DesignFirst Last Address City State ZipJohn Smith 408 W. Park Lincoln NE 68522Angie Johnson 100 E. Central Minneapolis MN 55413George Ecks 501 3rd Street Houston TX 77338Good Table DesignCustomers and InvoicesCompany Phone Invoice Date CostACME Widgets (800) 555-1818 1006 4/5/98 14,000ACME Widgets (800) 555-1818 1201 3/1/99 5,000ACME Widgets (800) 555-1818 1375 5/15/00 12,500Green Tea Inc. (612) 555-7688 1131 8/1/99 5,500Green Tea Inc. (612) 555-7688 1256 10/15/00 14,000Bad Database DesignCustomers InvoicesID Company Phone IDInvoiceDate Cost5 ACME Widgets (800) 555-1818 5 1006 4/5/98 14,00020 Green Tea Inc. (612) 555-7688 5 1201 3/1/99 5,000 5 1375 5/15/00 12,500 20 1131 8/1/99 5,500 20 1256 10/15/00 14,000 iTech Professional Enhancement Training 4
  • Access Walk Through- Open Microsoft Access Title bar Menu bar Toolbar Database window Objects bar Status bar Database objects and Wizards- Database Objects • Input – Tables &Forms • Output – Queries & Reports • Others – Pages, Macros (automatic command strings), & Modules (using Visual Basic – very advanced)- Design Wizards • Helpful and easy for new users • Automate and ease the creation process, particularly for forms and reports • Create using wizard, then modify to meet needs • Do not confuse with “Design view” • Available for major tools- Tables • Tables store all information in a database; they are the key component of any database • The other objects are just tools to view, manipulate or analyze the info in the tables • Most databases have more than one table with each table containing related information • Tables are made up of fields (a specific piece of data, such as first name, last name, etc.) • All related fields for a person/thing make a record iTech Professional Enhancement Training 5
  • - Table Diagram Current Record Selector Field Names Field Record A name that identifies the A specific type of information, A collection of information about information in a field such as the last names of one person or thing, such as the your employees name and address of one employee- Navigational Aids First Current Record Last Record Number Record Total Number of Records in the Table Previous Record Next New Record Record Scroll Up Click here to scroll up Scroll Box Indicates your current position in the list (you can Scroll Down also click and drag the scroll Click here to box to scroll up or down) scroll downNote: These aids are here to help maneuver through Access databases. Though they areuseful when working with smaller databases, they are critical when working with largerdata pools. iTech Professional Enhancement Training 6
  • - Table – DESIGN VIEW This area displays the table’s field names This area displays the data type for each field. Click the Data Use this scroll bar to Type area for the field you want to change and select the data browse through a type you want to use from the list. table’s fields.- Data Types & Example data:Data Type Example DescriptionText Legal Name: Stores text, numbers, or a combination of both, up to 255 characters John Doe long. Text fields are the most common of all data types.Memo Notes: Stores long text entries—up to 64,000 characters long (equivalent to Sally displays a high amount 18 pages of text!). Use memo fields to store notes or anything else that of… requires lots of space.Number Age: Stores numbers that can be used in calculations. 31Date/Time Birthday: Stores dates, times, or both. April 7, 1969Currency Price: Stores numbers and symbols that represent money. $84.95AutoNumber Invoice Number: Automatically fills in a unique number for each record. Many tables 187001 often contain an AutoNumber field that is also used as their primary key.Yes/No Smoker?: Stores only one of two values, such as Yes or No, True or False, etc. YesOLE Object Photo: Stores objects created in other programs such as a graphic, Excel spreadsheet, or Word document.Hyperlink Web Site: Stores clickable links to files on your computer, on the network, or to www.amazon.com web pages on the Internet.Lookup Wizard Purpose of Trip A wizard that helps you create a field whose values are selected from a • Business table, query or a preset list of values. • Pleasure • Both • Other iTech Professional Enhancement Training 7
  • - Forms • An optional tool to help entering data • Can include fill-in-the-blanks, checkboxes, lists, etc. • May prompt for appropriate responses or validate data entry- Form Diagram Add new record Record Selector Click to select the entire record Delete current record Record navigation buttons- Form – DESIGN VIEW Field List Toolbox button Properties button button Click to Click to display Click to display/hide the properties for the display/hide the Toolbox selected object Form Selector Click to select the entire form. Double- click to display the form’s properties Field List Form Header Drag and drop to Appears at the place fields on the top of the form form Details Divider Drag down to Toolbox create a form Click to create controls header on the form. Form Footer divider Form Footer Drag to create or Appears at the resize a form footer bottom of the form iTech Professional Enhancement Training 8
  • - Queries • A tool to view specified pieces of a database • An inquiry; asks question(s) of the information in a table • Retrieves and displays result of question- Query Diagram Table(s) that are queried Specifies which fields you want to Criteria And Or Rows be included in the query Defines one or set of limiting conditions, such as =”USA”- Query – DESIGN VIEW Table name Field list Design grid Double-click the field you want to appear in the design grid or drag the field onto the design grid yourself Field names go here Table in which field is located Sort order goes here Criterion goes hereA checkmark means the field will be displayed in the query results iTech Professional Enhancement Training 9
  • - Reports • Output • A tool to to print or display database information from table or query • Enable more sophisticated formatting and presentation options, including charts and calculations- Report diagram- Report – DESIGN VIEW Report Selector Field List button Toolbox button Properties button Click to select the Click to display/hide Click to display/hide the Click to display properties for entire report. the Field List Toolbox the selected object Double-click to display the report’s properties Field List Drag and drop Report Header to place fields Appears at the on the report top (first page) of the report ToolboxPage Header Click to createDrag down to create controls on thea page header report. for more about each of these controlsReport Footer dividerDrag down to create afooter that will appearat the very end (last Details Page Footerpage) of the report Appears for each record Appears at the bottom of each page iTech Professional Enhancement Training 10
  • Exercise 1A: Create a simple table call Customer Contacts using the Create TableWizard. The table should contain the following fields:Customer ID First Name Last Name Phone Number Email Address(Key) Address 1 City State Postal CodeNote: It is very important that the “Customer ID” Field is set as the key because we are going to use it tocomplete later exercises.Step 1: Open Microsoft AccessStep 2: Click the New Database button located at the top right of the page Note: This can also be access through the path “File>new”Step 3: Click the “Blank Database” Option Note: This option will appear in different place depending on how you have your machine configured.Step 4: Name and save your database. Prior to creating any tables you must first name and save your database. To complete this step, you must first determine where you want to store your database, then name your database, and finally click the “Create Button” Located at the bottom right of the file menu. Note: Make sure that you name your database something indicative of the data that it contains. For this lesson, name your database “Train_Cust_Info” and save them to the desktop of your lab machine. iTech Professional Enhancement Training 11
  • Step 5: Create your table. You should now see a number of options for creating tables. For this exercise we are going to create a table using the wizard. To create a table using the wizard, first double-click the “Create table by using wizard” link located in the database window.Step 6: Determine field requirements. You now have to decide which sample table to base your design. To determine the best table for your business needs, see what fields are available in each of the sample tables by clicking on each one located on the left side of the Table Wizard window. Table Type Select the table Field Selector type that you Click to add wish to use selected field to your table. Table Sample Field List Select the sample Standard fields table you want to with in each use sample table.Step 7: Select table and fields. For this exercise select the Table Type as “Business”, the Sample Table as “Customers” and then select the fields that were described in the first part of this exercise. iTech Professional Enhancement Training 12
  • Step 8: Name Your Table. Enter the name for your table as “Customers Contacts”. Once you have named your table, select the radio option “No, I’ll set the primary key”, and then click “Next”. Note: It is VERY important that the primary key is set correctly, because the key is used to link this table to other table that will be created in this class.Step 9: Set the Primary Key. From the drop down menu, set the primary key as “CustomerID”, and then select the radio option “Numbers I enter when I add new records". This option is set to allow you to create your own customer ID’s and if you want Access to assign your customer number automatically, select the first radio option. iTech Professional Enhancement Training 13
  • Step 10: Finish Table Creation. Now you are ready to finish your table. There are a few options regarding data entry and for the purposes of this exercise, we are going to select the radio option “Enter data directly into the table”. Note: In later exercises we will explore different options for data entry.Congratulations !!! You have successfully created a table. You should see the followingscreen, which is your table ready for data entry. Save your work and close MicrosoftAccess and return to your desktop.Now we will complete a similar process of creating another table, but instead of using awizard to create the table, we are going to create a table manually. iTech Professional Enhancement Training 14
  • Exercise 1B: Create a simple table call Customer Billing using one of the manualprocesses.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Security Warning: If you receive the following security warning message, just click noand continue.Step 4: Manual Table Creation. Form the Database window, ensure that the Table object is selected, then click the “New” button. iTech Professional Enhancement Training 15
  • Step 5: Picking a Manual Method. There are a number of manual methods for creating tables, but for the purposes of this exercise let’s use the Design View method. To select this method, simply select it and click OK.Step 6: Fields Definitions. The next step is to define what fields you want to add to this table. In order to define a field, you must name it, select a data type, and give a brief description of the field. Create the following field using the Design View.Step 7: Define Primary Key. Since we are going to be linking these tables in a later exercise, we must define the same primary key in all tables. To set the field CustomerID as the primary key, right click directly to the left of the field name and then left click the option for Primary Key. This can also be accomplished by selecting the field and clicking the button located on the Access menu.Step 8: Save Your Table. Now that you have created another table, you will need to save it. In order to save your table, you must first name it. Click on the located on the Access menu bar. This can also be accomplished by saving through the file menu. After you click the Save button, you are prompted to enter a name for your table. For the purposes of this exercise, name this table “Train_Cust_Bill” and click OK. Remember: Name your tables indicative of the data that it contains.Congratulations !!! You have successfully created another table. Now we will input datainto the two table that you have created. Close all open windows and get back to yourdesktop. iTech Professional Enhancement Training 16
  • Exercise 1C: Entering Data. In this exercise we will enter data into the two tables thatyou have created. The method for data entry will be to enter data directly into the tableswithout using a form. The next set of exercises will demonstrate the benefits of usingforms for data entry.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Security Warning: If you receive the following security warning message, just click noand continue.Step 4: Selecting Tables. To select the table you wish to enter data into, simply double- click the table name located in the Access database window. iTech Professional Enhancement Training 17
  • Step 5: Entering Data. Enter the following information into the Customers Contacts table.Step 6: Enter the following information into the Train_Cust_Bill table.Congratulations !!! You have successfully entered data into the two table that werecreated in the earlier exercises. Now we will create forms to enter data into your tables.Close all open windows and get back to your desktop. iTech Professional Enhancement Training 18
  • Exercise 2A: Create a Form for data entry using the Form Wizard. In this exercise we aregoing to explore a different way to enter data into your table. Instead of entering the datadirectly into a table, the form function of Access will allow you to create a moregraphical interface to enter your data.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Forms” object option that is located on the left side of the Access database window. iTech Professional Enhancement Training 19
  • Step 5: Double-click the option “Create form by using wizard”.Step 6: Select the table and fields that you wish to add to you from. To select you table, simply select it from the drop down menu located at the top of the Form Wizard window. To add fields to your from, just highlight it and then click the greater- than button located in the middle of the Form Wizard window. Note: To add all field from your table to your form at once, click the double greater-than sign located under the circled one.Step 7: Add all fields contained within the Customers Contact table, then click next. iTech Professional Enhancement Training 20
  • Step 8: Choosing a form layout. The Form Wizard allows you to create different form layouts, depending on what would suit your business needs. For the purpose of this exercise, select the “Columnar” design and click “Next”.Step 8: Choosing a form style. The Form Wizard allows you to create different style for your forms. This is strictly a cosmetic setting and will not affect the performance of you database. For the purposes of this exercise, select the “Standard Style” and click “Next”. iTech Professional Enhancement Training 21
  • Step 9: Naming and Finishing. The Form Wizard will allow you to create different for your form, but for clarity purposes, except the default name and click “Finish”You should now see the form that is displayed below, if you do not see this form, pleasereview your step to see if any were configured incorrectly.Congratulations !!! You have successfully created a form for data entry. Now we willcreate another form for our other table, but instead of using a wizard to create it, we willcreate it using a manual process. Close all open Access windows and return to yourdesktop. iTech Professional Enhancement Training 22
  • Exercise 2B: Create a Form for data entry using an automatic process. In this exercise weare going to explore a different way to enter data into your table. Instead of entering thedata directly into a table, the form function of Access will allow you to create a moregraphical interface to enter your data.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Forms” object option that is located on the left side of the Access database window. iTech Professional Enhancement Training 23
  • Step 5: Click the option “New”.Step 6: Select Which AutoForm. From the New Form window, select the AutoForm layout that you wish to use. These are the same layouts that were demonstrated in the previous steps. Click the “AutoForm: Columnar”, then select the Train_ Cust_Bill table from the drop down and click OK.You should now see the form that is displayed below, if you do not see this form, pleasereview your step to see if any were configured incorrectly. iTech Professional Enhancement Training 24
  • Step 7: Naming and Saving. The last thing you need to do is save this form. To save the form, simply click the save button located on the Access toolbar. Access will prompt you to name the form, and by default the name of the table that it is linked to will display. For the purposes of this exercise, except the default name and click OK.Congratulations !!! You have successfully created a form for data entry. Now we willenter more data into our tables, but instead of entering the data directly into the tables, weare going to enter the data using the newly created forms. Close all open Access windowsand return to your desktop. iTech Professional Enhancement Training 25
  • Exercise 2C: Entering Data Into A Form. In this exercise you will append the data that isin your tables by using your forms that were created in the earlier exercise.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Forms” object option that is located on the left side of the Access database window. Then double-click the form “Customers Contact”. iTech Professional Enhancement Training 26
  • Step 5: Enter the following data into your form, but remember to add a new record to the form you must click on the new record button at the bottom of the form window. When you are finished entering data, close the Customers Contacts form.Step 6: Open the other form by double clicking on the form from the Access Database window. iTech Professional Enhancement Training 27
  • Step 7: Enter the following data into your form, but remember to add a new record to the form you must click on the new record button at the bottom of the form window.Step 8: Return to the Table objects (Click on “Tables” from the left side of the Access Window) and look at the appended tables to see your additions. To open the table, simply double-click the table name located on the Tables tab of the Access window. Your tables should resemble the one shown below.Note: You can create shortcuts to you forms so when you enter data, you simply open theform and not the entire Access program.Congratulations !!! You have successfully entered data using a form. Now we will createqueries to pull data out of our tables. Close all open Access windows and return to yourdesktop. iTech Professional Enhancement Training 28
  • Exercise 3A: Creating Queries using Query Wizard & One Table. In this exercise wewill create a query using the wizard that is provided by the Access application.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Queries” object option that is located on the left side of the Access database window, then double click the “Create query by using wizard” option. iTech Professional Enhancement Training 29
  • Step 5: Selecting Tables and Fields. The next thing that has to be done is to determine which table you want your query to pull data from. Once you have decide on a table to use, now select the fields you wish do display by selecting them in the left column and then clicking the greater than button located in the middle of the wizard window. For this exercise, add all the fields in the Customer Contacts Table, then click “Next”. Note: If you are going to add all fields in the table to your query, simply click the Double greater than sigh located directly under the single greater than sign.Step 6: Name Your Query. The name that you select for your query should be indicative of the data that it pulls. Enter you name in the field provided, then click the Finish button located at the bottom right side of the wizard window.You should now see your query display on your screen, if you do not see your query,review the steps to see if any were missed. iTech Professional Enhancement Training 30
  • Congratulations !!! You have successfully created a query. Now we will create a queryusing more than one table, as well as setting criteria to filter data from the tables. Closeall open Access windows and return to your desktop.Exercise 3B: Creating Queries using Multiple tables. In this exercise we will create aquery using the two table that were created earlier in this document.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Queries” object option that is located on the left side of the Access database window, then double click the “Create query in Design veiw” option. iTech Professional Enhancement Training 31
  • Step 5: Determine which tables to use. This step allows you to select which table(s) to use in building your query. To select a table, highlight the table name and then click the “Add” button. For this exercise, add both the tables that were created in the earlier exercises. Note: Access will allow you to create queries using table or other existing queries.Step 6: Selecting fields from each table. To select a field, simply double-click on the field name displayed in the two table windows that appear in the Query Design view window. For the exercise, add the following fields to the query: CustomerID, FirstName, LastName, PhoneNumber, Email, Billing Date, Billing Amount, Billing Status, & State. iTech Professional Enhancement Training 32
  • Step 7: Setting Criteria. This step will allow you to filter your data based of criteria that you define. For this query, we are trying to see who still owes money to our company and out of those people, which are from Mississippi. Set your criteria to only pull records that the Billing Status = “No” and the State = “MS”.Step 8: Naming & Saving. To name and save your new query, simply click the save button located on the Access menu, enter the query name, and click OK. For this exercise, name the query “OutStanding Balances in MS”.Step 9: Running Your Query. To run your new query first close the Query Designer by clicking the “X” in the top right of the Query Designer Window, then double-click the query name from the Queries tab on the Access Database window. iTech Professional Enhancement Training 33
  • You should now see your query, which contains only one record of an out standingaccount balance in MS. If you receive an error when you try to run your query, doublecheck your criteria statements to make sure that they are correct.Congratulations !!! You have successfully created a query using multiple table. Now wewill create a report to display our query results in a more cosmetic fashion. Close all openAccess windows and return to your desktop. iTech Professional Enhancement Training 34
  • Exercise 4A: Creating Reports to display Query results. In this exercise we will create areport using the queries that were created earlier in this document.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Reports” object option that is located on the left side of the Access database window, then double click the “Create report by using wizard” option. iTech Professional Enhancement Training 35
  • Step 5: Determining Queries and Fields. You must decide which queries to use to make your report, then decide which fields from that query to show on the report. Select the Customers Contacts Query from the drop down menu, add all fields from the query to the report, and then click “Next”.Step 6: Grouping Levels. Access allows you to assign grouping levels to your report, but for this exercise we will not be adding any grouping levels. Click “Next” to move to the next screen.Step 7: Ordering your report. Access allows you to order your reports on any included field. For this exercise we want to display results in Ascending order of the CustomerID field. Select CustomerID from the first drop down menu and then click “Next” Note: Access will allow for four different levels of sorting, however this can slow down the processing speed of your database. iTech Professional Enhancement Training 36
  • Step 8: Report Layout. Access allows you to layout your reports in three different formats, depending on your reporting needs. For this exercise, choose the option for Tabular and Landscape and then click “Next”.Step 9: Choose your style. Access offers several different report appearances that you can choose from. For this exercise, accept the default (Corporate) and click “Next”.Step 10: Naming Your Report. Enter a report name of “Customer Contacts” and click the Finish button at the bottom right side of the page. iTech Professional Enhancement Training 37
  • You should now see your report display on the screen. If you do not see your report or ifyou receive an error, review your steps to make sure none were left out.Congratulations !!! You have successfully created a report using a query. The nextexercise will walk you through the process of creating a report automatically. Close allopen Access windows and return to your desktop. iTech Professional Enhancement Training 38
  • Exercise 4B: Creating Reports automatically to display Query results. In this exercise wewill create a report using the queries that were created earlier in this document.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Reports” object option that is located on the left side of the Access database window, then click the “New” option. iTech Professional Enhancement Training 39
  • Step 5: Choose your style and Query. Access uses the same styles that were offered using the Wizard for the Automatic process. For the exercise, select the “AutoReport: Tabular” option and the query “Customers Contacts Query” and click “Next”.You should now see the same report that was created using the Report Wizard. Noticethat you did not have to select any fields; this is because the Automatic Process uses allavailable fields from the selected query or table.Step 6: Naming & Saving. The only thing left to do on this report is to name it and then save it. To name and save your report, click the save button located on the Access menu bar, name the query, and then click “OK”. For this exercise, name your report “Customers Contacts II”.Congratulations !!! You have successfully created a report using an Automatic Process.Close all open Access windows and return to your desktop. iTech Professional Enhancement Training 40
  • Exercise 5A: Importing an Excel Spreadsheet using the Import Table Wizard.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Table” object option that is located on the left side of the Access database window, then click the “New” option. iTech Professional Enhancement Training 41
  • Step 5: Select the option Import Table from the New Table popup window and click OK.Step 6: Browse to the location of your Spreadsheet, select the Spreadsheet you wish to import, and then click Import.Step 7: Determine which sheet within the Spreadsheet that you would like to import, and click “Next”. iTech Professional Enhancement Training 42
  • Step 7: Check the “First Row Contains Column Headings” option to set the name of the Access field to the names given on the Spreadsheet, and click Next.Step 8: Determine whether you want to make a new table from the Spreadsheet data or you also have the option to append the data to another table. Choose the New option and click Next. iTech Professional Enhancement Training 43
  • Step 9: Changing field names and information. Access gives you the option of changing the names of the Access fields from what they were in your Spreadsheet. To change the name of any field, select it and type the new name. Access also gives you the option to skip fields if you do not desire all Spreadsheet fields in your database. Click Next.Step 10: Setting the Primary Key. Access will let you choose one of the existing Spreadsheet fields for the key or it will auto generate a new field. Set the Primary Key to the ID that we imported from the Spreadsheet and click Next. iTech Professional Enhancement Training 44
  • Step 11: Naming the new table. By default, Access will retain the name of the imported sheet as the name of the new table. To change the name of the new table, enter the new name in the field provided. Enter the name “Student_GPA_Table” and click finish.Step 12: Access will notify you of the status of the Spreadsheet Import. Click OK to continue.Congratulations !!! You have successfully imported a table from an Excel Spreadsheet.Close all open Access windows and return to your desktop. iTech Professional Enhancement Training 45
  • Exercise 5B: Create a Query and Report for the Imported Spreadsheet. The query shouldonly display students who have a Cumulative GPA between 2.5 and 3.2 and who have alast name stating with an “S”.Step 1: Open Microsoft AccessStep 2: Click on the Open File button located at the top left of the Access applicationStep 3: Browse to your desktop and select the “Train_Cust_Info.mdb” file, then click “Open”Step 4: Click on the “Query” object option that is located on the left side of the Access database window, then click the “New” option. iTech Professional Enhancement Training 46
  • Step 5: Select the “Design View” option from the New Query window and click OK.Step 6: Select the Student_GPA_Table and click the Add & Close buttons from the Show Table window.Step 7: Selecting fields to add to your query. To select fields from the Student_GPA_Table, simply double-click each field name listed in the table window. iTech Professional Enhancement Training 47
  • Step 8: Setting criteria on specific fields to filter data. To set criteria on a field, enter the correct filter value in the “Criteria” row located under the field. To accomplish the the Cumulative GPA filter enter “between 2.5 and 3.2” without “” and to accomplish the Last Name filter enter “S*” with “”.Step 9: Naming and Saving your query. To save the new query, click the Save button located on the Access menu bar, enter the name, and click OK. Enter the name “Student GPA Query”, then click OK.Step 10: Run the query and view the results. To run this, first close or minimize the Design View and then double-click the query from the Access Window. You should see the following results from your query.Step 11: Create a report to display the new queries results. To create a report, first close the open results and click the Reports option from the Access Window, then click New. iTech Professional Enhancement Training 48
  • Step 12: Report options and query selection. Select the report option of “AutoReport: Tabular” and select the “Student GPA Query” from the drop down menu.Step 13: Viewing your results. You should now see the results of your query displayed in a tabular report. Your results should appear as follows:Step 14: Saving your report. To save your new report click File>Save and enter the name of the report. Enter the name “Student GPA Report” and click OK.Congratulations !!! You have successfully created a query and report from the importedspreadsheet. All you have left to do know is practice, practice, practice. Close all openAccess windows and return to your desktop. iTech Professional Enhancement Training 49
  • Access Components ReviewMicrosoft Access consists of four major components: 1. Tables – Where the data is stored. 2. Queries – Tool used to extract and filter data from the tables. 3. Forms – Tool used to created forms for data entry. 4. Reports – Tool used to display data contained in a table or query.Remember: When building databases, tables come first, then useally forms, next isqueries, and finally reports. Understanding these basic components will allow you tosupport larger more complex database design with much greater ease. In order to becomeefficient in Access there is only one thing to do, PRACTICE!!! iTech Professional Enhancement Training 50