Académique Documents
Professionnel Documents
Culture Documents
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
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
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.
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
New Object
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.
Data type- this will usually be text, but you can also have dates, yes/no, and numerical data
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.
2.
3.
button, you can delete a table, report, form or query that you have made.
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.
ELECTRONIC CAMPUS
Page 5
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.
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.
7.
Drag or copy your Access file to the Desktop from My Documents and close all other windows.
helpdesk@nwmissouri.edu.
ELECTRONIC CAMPUS