Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Creating Your Database

access en




Use the Database Wizard when you want to model your database on one of the templates that Access 2002 provides. The templates are generally business related and include Expenses, Inventory Control 10110l111k , and Order Entry, though you can change them to suit your needs. The options for accessing templates are available under in the New File task pane, under New from template.

 
Creating Your Database

To get started with Access 2002, you can create a database to store information about ships that sank in the Great Lakes. Students can gather this information from scientific and anecdotal data found on the Web and in other sources, like film documentaries. They can then use Access 2002 queries to study trends and analyze the data.

There are two ways to create a database. You can use the Database Wizard to create the required tables, forms, and reports for the type of database that you choose. Or, you can create a blank database and then add the tables, forms, reports, and other objects later.

To create a blank database

Open Access 2002.

On the File menu, click New.

In the New File task pane, under New, click Blank Database.

In the File New Database dialog box, browse to the location where you want to save the database, type Shipwrecks as the file name, and then click Create.

Among the options for creating a table, the Table Wizard can be helpful because it provides sample tables and sample fields, though these samples are geared toward business or personal use.

 

When you click Create, the Shipwrecks database window opens. You can now create and store tables, forms, queries, and reports in the database.

Adding objects and data to your database

The first object to add to your database is a table. For example, after you create the Shipwrecks database, you can create one table; each record in the table will store data about one specific ship. It's easy to create a table in Design view.

A data type is the characteristic of a field that determines the type of data the field can hold. Some of the more common data types are:

Text.   Use for fields where you plan to enter text.

Date/Time.   Use to indicate the date.

Currency.   Use to prevent rounding off during calculations.

Hyperlink.   Use to add a hyperlink.

 
To create a table in Design view

In the Shipwrecks database window, click the Tables button.

Double-click Create table in Design view.

In the first row of the Field Name column, type the first field (for example, Ship Name) that will appear on a table in your database.

Click the Data Type column. The default data type of Text automatically appears.

Note   In this case, the default data type works well. If you wanted to change the data type, you could do so by placing your cursor in the Data Type column, clicking the arrow that appears, and then clicking the data type in the list.

Type all the other fields in the Field Name column, and select the corresponding data type for each.

Click the field that you want to be the primary key, and then on the toolbar, click the Primary Key button .

Click the Save button. In the Save As dialog box, type the name of the table (for example, All Ships), and then click OK.

If you want to create additional tables for your database, you can do either of the following:

If the tables will have significantly different fields, repeat this procedure.

If the tables will contain the same fields (for example, if you were making a shipwrecks table for each of the five Great Lakes), you can use your first table as a template for the others. In the database window, right-click the table you want to copy, and then click Copy. Right-click the white background area of the window, click Paste, type a table name, click Structure Only, and then click OK.

Close the table in Design view. You can see that the table is contained in the database window.

For now, don't worry about the order of the records you intend to add. You can organize them later.

 
Adding data

After you create your tables and the fields within those tables, you are ready to add data.

To add data to a table

In the database window, double-click the table. The table opens in Datasheet view.

Type data-for example, Edmund Fitzgerald-in the first field of the first record. As soon as you begin to enter a value in the first field, Access 2002 automatically adds another record to the table.

Press TAB or the RIGHT ARROW key to move to the second field, and type the data. For example, type freighter under the Type of Ship field. If you need to change data that you already typed, you can move to the left by pressing SHIFT+TAB or the LEFT ARROW key.

Note   Unless a field is required, you can leave it empty.

Add data in the remaining fields in the record.

When you reach the end of the first record, press TAB or the RIGHT ARROW key to move to the next record in the table.

To quickly move from record to record, you can use the buttons at the bottom of the table window in Datasheet view.

To delete an entire record, select it by clicking the bar on the left, press DELETE, and then click Yes.

 
Continue to add records and data.

Note   The following illustration shows a sample database about shipwrecks in the Great Lakes. It is not complete or comprehensive, but provides enough data to show the capabilities of Access 2002. The procedures in this chapter that refer to the All Ships table refer to this table exactly as it is.

Next record

 

New record

 

Last record

 

Previous record

 

First record

 


When you finish adding data, if you close the table, changes are saved automatically.

Finding records in a table

At times, you may want to quickly make changes to a record, but because there are so many records in your table, the record you want isn't immediately visible when you open the table. If you know the number of the record you want to see, you can double-click the number in the record number box (in the lower-left corner in Datasheet view), type the number of the record you want, and then press ENTER.

Another way to quickly find a record-or to find information within a record- is by using the Find tool.

To find a record

Open the table, and then activate the field for which you plan to enter a value. For example, if you want to find the record for the ship Lady Elgin, click Ship Name so that the whole column is selected.

On the Standard toolbar, click the Find button .

In Find and Replace dialog box, in the Find What box, type what you are looking for. For example, type Lady Elgin

In the Look in box, Ship Name is automatically entered. In the Match box, Whole Field is automatically entered. Because, in this case, you are searching for a whole entry in the Ship Name column, the information in these boxes is correct. Click Find Next.

When you find the item, click Cancel to close the Find and Replace dialog box.


Document Info


Accesari: 920
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )