Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Show All
Create a table by using the Table Wizard
1.
Press F11 to switch to the Database window (Database window: The window that appears when you
open an Access database or an Access project. It displays shortcuts for creating new database objects and
opening existing objects.).
2.
Click Tables
under Objects, and then click New on the Database window toolbar.
3.
4.
(Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros,
and data access pages. In Design view, you can create new database objects and modify the design of existing
ones.)
Create a table in Design view
1.
Press F11 to switch to the Database window (Database window: The window that appears when you
open an Access database or an Access project. It displays shortcuts for creating new database objects and
opening existing objects.).
2.
Click Tables
under Objects, and then click New on the Database window toolbar.
3.
4.
Open the table in Design view (Design view: A window that shows the design of these
database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you
can create new database objects and modify the design of existing ones.).
To insert the field within the table, click in the row below where you want to add the field, and
then click Insert Rows
on the toolbar.
To add the field to the end of the table, click in the first blank row.
3.
4.
Click in the Field Name column and type a unique name for the field.
In the Data Type column, keep the default (Text); or click in the Data Type column, click the
arrow, and select the data type (data type: The characteristic of a field that determines what type of data
it can hold. Data types include Boolean, Integer, Long, Currency, Single, Double, Date, String, and
Variant (default).) you want.
5.
In the Description column, type a description of the information this field will contain. This
description is displayed on the status bar (status bar: A horizontal bar at the bottom of the screen that
displays information about the current condition of the program, such as the status of items in the
window, the progress of the current task, or information about the selected item.) when adding data to
the field and is included in the Object Definition of the table. The description is optional.
5.
Define a primary key (primary key: One or more fields (columns) whose values uniquely identify each
record in a table. A primary key cannot allow Null values and must always have a unique index. A primary key
is used to relate a table to foreign keys in other tables.) field before saving your table.
How?
1.
2.
Open a table in Design view (Design view: A window that shows the design of these
database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you
can create new database objects and modify the design of existing ones.).
Select the field or fields you want to define as the primary key (primary key: One or more
fields (columns) whose values uniquely identify each record in a table. A primary key cannot allow Null
values and must always have a unique index. A primary key is used to relate a table to foreign keys in
other tables.).
To select one field, click the row selector (row selector: A small box or bar that, when clicked, selects an
entire row in table or macro Design view, or when you sort and group records in report Design view.) for
the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each field.
3.
NOTE
on the toolbar.
If you want the order of the fields in a multiple-field primary key to be different from the order of those
6.
2.
Press F11 to switch to the Database window (Database window: The window that appears when you
open an Access database or an Access project. It displays shortcuts for creating new database objects and
opening existing objects.).
Click Tables
under Objects, and then click New on the Database window toolbar.
3.
Double-click Datasheet View. A blank datasheet is displayed. The default column names are Field1,
Field2, and so on.
4.
Rename each column you will use: double-click the column name, type a name for the column, and then
press ENTER.
5.
You can insert additional columns at any time: click in the column to the right of where you want to insert
a new column, and then on the Insert menu, click Column. Rename the column as described in step 4.
6.
names, enter the first name in its own column and the last name in a separate column. If you are entering
dates, times, or numbers, enter them in a consistent format so that Microsoft Access can create an appropriate
data type (data type: The characteristic of a field that determines what type of data it can hold. Data types
include Boolean, Integer, Long, Currency, Single, Double, Date, String, and Variant (default).) and display
format (format: Specifies how data is displayed and printed. An Access database provides standard formats for
specific data types, as does an Access project for the equivalent SQL data types. You can also create custom
formats.) for the column. Any columns you leave empty will be deleted when you save the datasheet.
7.
8.
When you've added data to all the columns you want to use, click Save
on the toolbar to save your
datasheet.
Microsoft Access asks you if you want to create a primary key (primary key: One or more fields (columns)
whose values uniquely identify each record in a table. A primary key cannot allow Null values and must always
have a unique index. A primary key is used to relate a table to foreign keys in other tables.) . If you haven't
entered data that can be used to uniquely identify each row in your table, such as part numbers or ID numbers,
it's recommended that you click Yes. If you have entered data that can uniquely identify each row, click No, and
then specify the field that contains that data as your primary key in Design view (Design view: A window that
shows the design of these database objects: tables, queries, forms, reports, macros, and data access pages.
In Design view, you can create new database objects and modify the design of existing ones.).
How?
1.
2.
Open a table in Design view (Design view: A window that shows the design of these
database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you
can create new database objects and modify the design of existing ones.).
Select the field or fields you want to define as the primary key (primary key: One or more
fields (columns) whose values uniquely identify each record in a table. A primary key cannot allow Null
values and must always have a unique index. A primary key is used to relate a table to foreign keys in
other tables.).
To select one field, click the row selector (row selector: A small box or bar that, when clicked, selects an
entire row in table or macro Design view, or when you sort and group records in report Design view.) for
the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each field.
3.
NOTE
on the toolbar.
If you want the order of the fields in a multiple-field primary key to be different from the order of those
2.
Press F11 to switch to the Database window (Database window: The window that appears when you
open an Access database or an Access project. It displays shortcuts for creating new database objects and
opening existing objects.).
Click Tables
Access displays the message specified in the ValidationText property when the rule is violated.)