- Press F11 to switch to the Database window.
- Click Tables under Objects, and then click New on the Database window toolbar.
- Double-click Table Wizard.
- Follow the directions in the Table Wizard dialog boxes.
Note If you want to modify or extend the resulting table, you can do so in Design view when you have finished using the Table Wizard.
- Press F11 to switch to the Database window.
- Click Tables under Objects, and then click New on the Database window toolbar.
- Double-click Design View.
- Define each of the fields in your table.
- Open the table in Design view.
- 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.
- 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 you want.
- In the Description column, type a description of the information this field will contain. This description is displayed on the status bar when adding data to the field and is included in the Object Definition of the table. The description is optional.
-
Define a primary key field before saving your table.
- Open a table in Design view.
- Select the field or fields you want to define as the primary key.
To select one field, click the row selector for the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each field.
- Click Primary Key on the toolbar.
Note If you want the order of the fields in a multiple-field primary key to be different from the order of those fields in the table, click Indexes on the toolbar to display the Indexes window, and then reorder the field names for the index named PrimaryKey.
Note You don't have to define a primary key, but it's usually a good idea. If you don't define a primary key, Microsoft Access asks if you want Access to create one for you when you save the table.
- When you are ready to save your table, click Save on the toolbar, and then type a unique name for the table.
Create a table by entering data in a datasheet
- Press F11 to switch to the Database window.
- Click Tables under Objects, and then click New on the Database window toolbar.
- Double-click Datasheet View. A blank datasheet is displayed. The default column names are Field1, Field2, and so on.
- Rename each column you will use: double-click the column name, type a name for the column, and then press ENTER.
- 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.
- Enter your data in the datasheet.
Enter each kind of data in its own column (each column is called a field in Microsoft Access). For example, if you are entering 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 and display format for the column. Any columns you leave empty will be deleted when you save the datasheet.
- 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. 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.
- Open a table in Design view.
- Select the field or fields you want to define as the primary key.
To select one field, click the row selector for the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each field.
- Click Primary Key on the toolbar.
Note If you want the order of the fields in a multiple-field primary key to be different from the order of those fields in the table, click Indexes on the toolbar to display the Indexes window, and then reorder the field names for the index named PrimaryKey.
Microsoft Access will assign data types to each field (column) based on the kind of data you entered. If you want to customize a field's definition further