Vous êtes sur la page 1sur 7

ELECTRONIC CAMPUS ONLINE USERS GUIDE 2004

Getting Started with Access 2003


The following material has on been Microsoft Access

Some key terms that you will need to know when dealing with Access:
Fields These are categories of information that the database will accumulate. For example, a database of novels would be comprised of title, author, ISBN, as well as subject and keywords. These are all fields. This is all the specific information about an item in the database. For example: The Scarlet Letter, Nathaniel Hawthorne, 0486280489, fiction, "sin, guilt, hypocrisy in Puritan New England." These are all the records. This is typically represented in a table

developed in conjunction with Northwest's Department of Science/Information Systems. Computer

Access is a database program that allows you to organize data into tables and then make reports, forms and queries from those tables. Examples of databases include:

Records

Microsoft Access 2003: The Basics

NORTHWEST MISSOURI STATE UNIVERSITY

Barnesandnoble.com is a relational database that keeps information on books and other related products. B. D. Owens Library keeps their card catalogs on a database. Your student information at Northwest is kept in a database.

Files

Starting Access
1. 2. 3. 4. 5. 6. Click the Start button. Click Programs. Click Microsoft Office. Click Microsoft Access. Click New. Choose Blank Access database and click OK. 7. Access will ask you to name and save the database file. Access files are in reality collections of tables, queries, forms and reports. Be sure to select the location of where you want your Access database stored. Name this file Novels and select the location you want the file saved into. Click the Create button to save the item. Once saved, Access will open the database window. Each item on the left represents a type of object, such as a table, form or report, which you can create and modify within the current database.

8.

9.

Figure 1. Creating a database.

Access Window, Objects and Toolbar

Figure 2. Select object to create Table, Query, Form, etc. Table 1

Access object
Tables Queries Forms Reports Pages Macros Modules

Description
Tables store a databases information in rows called records and columns, which are called fields. A database must always contain at least one table. Queries ask a question of the information that you have stored in a table. For example, a query could display authors that only write science fiction. Forms are screens that provide an easy way to enter and view the information in a table or query. Reports allow information from a table or query to be displayed in a printed format. A special type of Web page designed for viewing and working with Microsoft Access information from an intranet or over the Internet. Macros perform routine tasks by automating them into a single command. Like macros, modules automate tasks but by using a built-in programming language called Visual Basic. Modules are more powerful than macros. Analyze Microsoft Script Editor Properties Access Help

File Search

Undo Office Code Relationships

New Object

Figure 3. Access Toolbar Features.


Page 2 M I C R O S O F T AC C E S S 2 0 0 3 : TH E B A S I C S

Creating a Table
1. 2. To create a table, click on the Table tab beneath Objects. Click on the New button. You have several design choices to select from to create your table, including Table Wizard and Design View, etc. Click Design View. Click OK. Enter the appropriate information as displayed below. Example: Type Title in the cell beneath the Field Name. Then press the [Tab] key. This will automatically place you in the Data Type field. Text will automatically appear in the cell. But you can use the arrow to select other categories. However, for the purposes of this tutorial, leave Text in the Data Type field. Press the [Tab] key once again. This will automatically place you in the Description field. Type Title of the Book as the description for the Title field. Press the [Tab] key and this will automatically place you in the next cell under Field Name. Click the Save button. Save the table as Novels. A warning box with the message that no primary key has been defined will appear. If you wish to make another field the primary key, simply highlight the field in question and click the Primary Key button. (See Table 2 on page 4) Select No. You will define the ISBN field as the primary key. (See Figure 6 on page 4) Highlight the ISBN field and click on the Primary Key button. The ISBN field is now the primary key of your Novels table. Description- this is optional, but useful to provide what type of information each field holds

6. 7.

3. 4. 5.

8. 9.

Field names- enter the category names here

Data type- this will usually be text, but you can also have dates, yes/no, and numerical data

Figure 4. Table Design View.

Figure 5. There is no primary key defined message.


ELECTRONIC CAMPUS Page 3

Creating a Table (continued from page 3)


Table 2

Access Object
Primary Key

What it does
A Primary Key is a unique number or field that identifies each record. It can be used in a complex database to make sure no records are accidentally repeated. If you allow Access to define it for you, it will automatically number each record you enter (Ex: 1, 2, 3 etc.)

Figure 6. A key will appear next to the field you wish to be the primary key.

Entering Information into a Table


Now that we have a table defined, we can enter information into the table. 1. From the View menu, select DataSheet View. The empty database table will appear. This is where specific records are entered. Enter the book information as Figure 7. Design & Datasheet shown in Figure 8. Views. Example: Type Fahrenheit 451 in the cell beneath Title. Press the [Tab] key. This will automatically place you in the cell beneath the Field Type entitled Author. Type Ray Bradbury in the cell beneath Author. Press the [Tab] key. This will automatically place you in the cell beneath the Field Type entitled ISBN. Type 0345342968 in the cell beneath ISBN. Using the same above steps add the appropriate information (as displayed in the below Table1: Table image) to Subject and Keywords. Then press the [Tab] key. This will take you to the next blank cell beneath Title. Continue to enter the information (as displayed in the below Table1: Table image) until all of the novels information is displayed in your table. Make sure each column is wide enough for your record information. You can resize each field column by double clicking between each column heading. Additionally, you may also right click on column headings and choose column width. You can also sort your table in ascending or descending order by right clicking on one of the field headings, and then choosing the sort option. Once you have finished entering your data, save and close the table window by clicking on the Close button in the top right corner of the Novels: Table window. If you click on the Close button before you save, Access will ask if you if you wish to save the information in question. Click Yes. Access will now return you to the opening dialog box, but now you will have one table under the Tables tab. Do not get the Delete button confused with the Exit/Close button. By clicking on the Delete

2.

3.

button, you can delete a table, report, form or query that you have made.

Figure 8. Datasheet View.


Page 4 M I C R O S O F T AC C E S S 2 0 0 3 : TH E B A S I C S

Creating Forms
1. 2. 3. 4. Click on the Forms item in the Objects list. Click on the either the New button and select Form Wizard or click on Create form by using wizard. Use the Form Wizard to make a new form. Click Form Wizard. For the purposes of this tutorial, include all of the fields in your report. On the next several windows, leave everything as the default or just click on the finish button. The buttons at the bottom of the window allow you to look at each record in your database individually.

Figure 9. Create a Form using the form wizard. 5. Pull down the Table menu at the top to choose your table if you clicked on Create form by using wizard. If you clicked on New to create your form, pull down the Table menu at the bottom to choose your table and click OK. Click the Double Right Arrows to include all fields in your form or click the Single Arrows to include only specific fields.

Figure 10. You can add field(s) in the Form Wizard by highlighting the field and using the arrow to send the field(s) in the Selected Field area. The last button with the arrow and star will allow you to add a new record to your database table. Close the form by clicking on the Close button. Now you will have a form in your database under the Forms item.

7.

6.

Creating a Query
A query is a question that you ask of the database. Example: If you wanted to know how many people owned dogs rather than cats or a specific kind of dog such as a poodle you could create a query to find the results. A query can utilize either a single table or several tables to acquire information. To create a query from a table, do the following: 1. 2. Click on the Query item in the Objects list. Click the New button or Create query in Design view. If you clicked New, be sure to choose Design View and click OK. Double click on the table you want to use in your query from the pop up box. You can also highlight the table(s) you wish to use and click on the Add button. Close the box by clicking on the Close button

3.

4.

Figure 11. The Show Table window.

ELECTRONIC CAMPUS

Page 5

Creating a Query (continued from page 5)


Your query design view window should look similar to the one below, with the contents of your table in a box on the top and query fields available below.

7.

Type Fiction in the cell entitled Criteria under Subject and press [Enter]. Access will automatically place quotation marks around the word when you press [Enter]. (See Figure 14)

Figure 14. Query 1: Select Query window. Figure 12. Query Design View window. 8. 5. Double-click on each field in your table that you wish to include in the query fields below The fields will automatically appear in the query field columns. Example: Double-click Title in Table1 (as show above). Title should automatically be placed in the first cell entitled Field. Then double-click on Author in Table1 (as show above). Author should automatically be placed in the first cell of the second column. Continued to add fields, until all information (accept for the *) is included in your query. The fields of your query. Click the Run button. The Datasheet View should appear with the desired information. (See Figure 15)

6.

Figure 15. The Datasheet View with the select query information.

9.

Save the query by clicking on the Save button and naming the query appropriately. (See Figure 16)

Figure 13. Double click on each field of your table you want in your query. It will appear in the columns below. Each Table box also includes a special field that is indicated by the asterix symbol *. Use this only if you want all fields to appear in your query. Leave Show boxes checked. If you uncheck the Show boxes, the column in question will not appear in Datasheet View.

Figure 16. The Save As window.

If you want a query that only shows certain information, type what you are looking for in the Criteria cell. For example, if you only want the novels that are works of fiction to appear in Datasheet View.

Page 6

M I C R O S O F T AC C E S S 2 0 0 3 : TH E B A S I C S

Creating a Report
1. 2. 3. 4. To create a Report, click on the Reports tab. Click on New or Create report by using wizard. If you clicked New, be sure to select Report Wizard. From the pull down menu at the top, choose the query you wish to make the report about. If you clicked on New and selected Report Wizard, choose the query from the bottom pull down menu and then click OK. Click the Double Right Arrows to include all fields in your report or click the Single Arrows to include only specific fields. For the purposes of this tutorial, include all fields in your report. On the next windows, leave everything as the default or just click on the finish button. Your new form will appear and look something like the one shown in Figure 17 depending on what formatting you desired:

5.

6.

Figure 17. Report view.

Closing & Saving Your Access Database


Close your Access database by clicking on the Exit/Close button. Your Access database will typically be saved in My Documents unless you specified a different location when you created your blank database. 8. 9. Double-click on My Computer. Double-click on either the 3 floppy (A:) drive or the USB Pen (Flash/Jump) Drive icon 10. Drag and drop or copy and paste your Access file from the Desktop into the floppy or USB Pen. The Access file will now be moved or copied into the floppy or USB Pen. 11. Close the floppy or USB Pen window by clicking the Exit/Close button.

Saving to a floppy disk or USB Pen drive:


1. 2. 3. 4. 5. If you would like to save your Access database to a floppy disk, double-click on My Computer. Double-click the C:drive icon. Double-click Documents and Settings folder. Double-click on the folder with your username. Double-click on the My Documents folder. This folder may already be located on your Desktop. If it is, skip steps 4 through 7.
Your Access database will typically be saved in My Documents unless you specified a different location when you created your blank database.

7.

Drag or copy your Access file to the Desktop from My Documents and close all other windows.

Need More Help? Contact the Help Desk!


If you need more assistance with Microsoft Access 2003, contact the Client ComputingInformation Systems Help Desk at 660-562-1634 or you can email the Help Desk at
Page 6

helpdesk@nwmissouri.edu.

Please provide contact informa-

tion with all emails.

ELECTRONIC CAMPUS

Vous aimerez peut-être aussi