Access(ing) A Database Project PRESENTED BY THE TECHNOLOGY TRAINERS OF THE MONROE COUNTY LIBRARY SYSTEM EMAIL: TRAININGLAB@MONROE.LIB.MI.US MONROE COUNTY LIBRARY SYSTEM 734-241-5770 1 840 SOUTH ROESSLER STREET MONROE, MI 48161 THE MONROE COUNTY LIBRARY SYSTEM SERVES ALL RESIDENTS OF THE COUNTY BY PROVIDING FREE ACCESS TO INFORMATION, EDUCATION AND RECREATION.
2
Table of Contents Purpose of Databases... 4 Access lets you:... 4 Database Objects:... 4 Opening a Database.....5 Using Windows XP... 5 Using Windows Vista... 5 Viewing Screen Attributes....6 Using Ribbons....7 Tabs... 7 Groups... 7 Buttons... 7 Office Button... 8 Help... 8 Database Objects... 9 Exercise 1: Open Database... 10 Open Database... 10 Name File... 10 Save and Edit Data... 11 Saving Data... 11 Update Data... 11 Add New Record... 11 Delete a Record... 11 Exercise 2: Tables... 12 Adding Field Names... 12 Entering Data into a Table... 12 Exercise 3: Forms... 14 Exercise 4: Reports... 15 Exercise 5: Queries... 16 Simple Query... 16 3
Purpose of Databases Data bases are used to organized lists of information for specific purposes, depending on the type of information in the list. Access helps you to create your list and then use the information according to the needs of the information. Macros Creates custom commands to perform a task by using a single command. Example would be, adding Name, Employee number to an expense report. Modules Enables creation of automatic tasks using a programming language Visual Basics. Access lets you: Store Information This is where lists are created for anything you want to track. This could include anything from recipes, mailing lists, employee info, and student info. Find Information This is where you find specific data within your lists or tables for editing or information purposes. Analyze and Print Information Here you can perform calculations, for example, percentage of sales in specific locations of a business. Manage Information Here you can edit information all at one time if you have listings with common data, for example, change the geographic area for a group of sales personnel. Share Information This is multiuser database which allows more than one user to work with the same database. Database Objects: Tables store data in rows (records) and columns (fields). All database projects must contain one table. Queries Asks questions of data stored in a table, example, how many people purchased a specific product. Forms Custom screen for viewing, adding and editing information in a table. Reports Creates a document that contains all the information in a table for printing. 4
Opening a Database Using Windows XP 1. Click on the Start button. 2. Point to All Programs. 3. Point to Microsoft Office. 4. Click on Microsoft Access Office 2007. Using Windows Vista 1. Click on the Start button. 2. Click All Programs. 3. Click on Microsoft Office. 4. Click on Microsoft Access 2007. 5
Viewing Screen Attributes Basic picture and descriptions of Access attributes. Office Button: Replaces the File menu found in previous versions of Access. Quick Access Toolbar: Contains common commands such as Save and Undo. You can add more commands as well. Title bar: Displays the name of the workbook you are currently working on and the name of the program you are using. Close button: Click the close button in the Title bar to exit the Access program. Ribbon: The tabs and groups on the Ribbon replace the menus and toolbars found in previous versions of Access. Field Templates Pane: Insert pre-designed fields into your database table. View buttons: Use these buttons to quickly switch between Normal, Page Layout, and Page Break Preview views. Scroll bar: Use the a scroll bar to view different parts of your data. Status bar: Displays messages and feedback. Navigation Pane: Here you can see and open your database objects such as tables, queries, forms, and reports. Object tabs: A tab appears for each open database object. Click a tab to view and work with that object. 6
Using Ribbons Ribbons contain three basic components. Tabs Command Tabs: Command tab Contextual tab Tabs that show by default when you open Access. Ex. Home, Create, External Data, and Database. Contextual Tabs: Appear when you perform a specific task and provides commands specific to that task. Ex. Opening a table object in Datasheet view, the Datasheet tab appears on the Ribbon under Table Tools. Button Group Dialog Box Launcher Program Tabs: Switching to a different mode, such as Print Preview, program tabs replace the default command tabs that appear on the Ribbon. Groups Tabs are separated into groups. Ex. The Home tab contains the View, Clipboard, Font, Rich Text, Reports, Sort Files, and Find. Some groups contain a Dialog Box Launcher at the bottom right corner. These dialog boxes are much the same as previously used in Access 2003. Some groups contain a gallery that displays formatting options. Buttons To use the command for a button, just click on it one time. You can hide the Ribbon so only tab names appear by double clicking on the tab name currently displayed. (Home or any other one). To show the Ribbon again, just double click the tab again. Based on the size of the program window, Access changes the appearance and layout of the commands within the groups. 7
Office Button Office button is the round button in the upper left corner of the window. It contains file management commands such as New, Open and Save. The office button replaces the File menu in earlier programs. Help Help gives you step by step instructions on performing tasks. Enter search keywords here. Browse help topic categories. Choose a help source. 1. Click on button in upper right corner, under the close button, OR, press the F1 key in the top row on the keyboard. 2. Type in search topic and press the Enter key on your keyboard. 3. Click the option that most closely describes what you are looking for. a. You may need to try more than one if you are not sure what terms to use. 4. Instructions are printable, or you can keep the Help window open and access it from the task bar at the bottom of screen. 8
Database Objects Tables Tables store a database s data in rows (records) and columns (fields). For example, one table could store a list of customers and their addresses while another table could store the customers orders. A database must always contain at least one table where it can store information all the other database objects are optional. Queries Queries ask a question of data stored in a table. For example, a query might only display customers who are from Texas. Forms Forms are custom screens that provide an easy way to enter and view data in a table or query. Reports Reports present data from a table or query in a printed format. Macros Macros help you perform routine tasks by automating them into a single command. For example, you could create a macro that automatically opens and prints a report. Modules Like macros, modules automate tasks but by using a built-in programming language called Visual Basic or VB. Modules are much more powerful and complex than macros. 9
Exercise 1: Open Database Open Database 1. Click the Start button. 2. Point to All Programs. 3. Point to Microsoft Office. 4. Click on Access 2007. 5. Click on Blank Database in middle pane. Templates Blank database Recent databases Name File 6. In the right pane, click in the file name box and type: Employee List 7. Click on the Create button in the bottom right of the window. 10
Save and Edit Data Saving Data 1. After you have entered data into a Table or other Object: 2. Click on the Home tab for the Object (Table, Report, etc) you are working with, Click on the Record button. 3. Click on Save and enter a Name for your Object. 4. It will enter the new name on the Object tab, and an Icon representing the type of Object you are working with. Update Data 1. When add new records in a Table, you will need to Update any other Objects you have created in your database. 2. Click on the Home tab for the Table and Click on the Record button. 3. Click on the Update button. a. If you click on another Object, you may have to Update the new data there also. Add New Record 1. Click on the Home tab. 2. Click on the Record button. 3. Click on New. The Table or Form will automatically move to the last record (row) or form. 4. Enter new data. 5. Click on Update, if needed for other objects. Delete a Record 1. Click on the Home tab. 2. Select the Record to be deleted. 3. Click on the Record button. 4. Click on the Delete button. a. Right clicking a record from the first blank column in the specific record, will open a menu with the option to delete. b. Once you delete a record, you cannot undo to get it back. 11
Exercise 2: Tables Use the data in the Table shown below to fill in the information in the following exercises: Adding Field Names, Entering Data Into a Table Adding Field Names 1. Click in Add New Field and click on the Rename option in the Datasheet tab. Then type in the Field Name. 2. Right click Add New Field at top of column two. Click on Rename at bottom of menu. 3. Type: First Name and press Tab key once. This will move to next column to type a new Field Name. 4. In third column Field Name type: Last Name and press Tab key once. 5. In fourth column Field Name type: District and press Tab key once. 6. In fifth column Field Name type: Zip Code and press Enter. Entering Data into a Table Add First Name, Last Name, District and Zip Code to your Table. Remember the ID will automatically fill in for you. Press Enter to go to the next record (row). Column One labeled ID is a key field. When using Access each record (row) needs a field that is completely different from all other records. This is set in a default format to use numbers, beginning with 1. Depending on use of database, employee id numbers or letters can be used, or something specific to the use of the database. You can change this by clicking on the Datasheet Tab and choosing from the list in the Data Type options. 12
When you delete a record, the ID is removed also. It does not change any other record numbers. Example, if you remove record number 12, all records following will stay as originally entered-13 and so on. 13
Exercise 3: Forms 1. Click on the Create Tab 2. Click on the Form button in the Forms group. 3. If you have not saved your Table, you will be asked to do so. Name it District List. 4. The Form will open and show each Record individually. 5. At the bottom of the window, you will see Navigation buttons to go scroll through each Record. a. Practice scrolling with the forward and backward arrows. b. Practice scrolling to first and last record with the arrows that have a line before or after it. 6. When you get to the last one, you can Add a new Record here, by filling in each section of the Form. 7. Add Record #9 with the following information: a. First Name: Linda b. Last Name: Mitchell c. District: North West d. Zip Code: 58277 8. Go to the District List Tab 9. Click on the Home tab ribbon 10. Click on the Records arrow 11. Click on Refresh, this will update the Table with the records you added into the Form. Whenever you add a new record or edit a record, click on the Refresh All button. You may have to do this on each Object Tab, Table, Report, Form, etc. 14
Exercise 4: Reports 1. Click on the Create tab. 2. On the Create ribbon, click on the Report button. 3. A new Report will put all your data into columns and rows. This is a printable report with a header, date and time of printing. Can be used in a presentation atmosphere. a. You may have to scroll across and down to see the whole document. b. There will be a dotted line to show page breaks. If you want to add a record to the Report, put it in the Table. Then Save the record. Then click on the Report tab and Update the records. 15
Exercise 5: Queries Simple Query 1. Click on the Table (District List) tab. 2. Click on the Create ribbon tab. 3. Click on the Query button. 4. You will see the New Query box open. 5. Select Simple Query Wizard. 6. Click OK. 7. In the next window click on ID to select it. 8. Click on the > 9. Click on Last Name, then > 10. Click on District, then > 11. Click the Next button. 16
12. box, type, Employee and District. 13. Be sure the radial button for Open the query to view information is green. 14. Click on Next. 15. The Query will open displaying the two designated fields data. 17