You can add new tables to an existing database by using the commands
in the Tables group on the Create tab.
Create a table, starting in Datasheet view In Datasheet view, you can enter data immediately and let Access build the table structure behind the scenes. Field names are assigned numerically (Field1, Field2, and so on), and Access automatically sets each field's data type, based on the data you enter.
- On the Create tab, in the Tables
group, click Table
.
Access creates the table and selects the first empty cell in the Add New Field column.
Note If you don't see an Add New Field column, you might be in Design view instead of Datasheet view. To switch to Datasheet view, double-click the table in the Navigation Pane. Access prompts you to save the new table, and then switches to Datasheet view. - On the Datasheet tab, in the Fields &
Columns group, click New Field
.
Access displays the Field Templates pane, which contains a list of commonly used field types. If you double-click or drag one of these fields into your datasheet, Access adds a field by that name and sets its properties to appropriate values for that type of field. You can change the properties later, if you want. If you drag the field, you must drag it onto an area of the datasheet that contains data. A vertical insertion bar appears, showing you where the field will be placed. - To add data, begin typing in the first empty cell, or paste data from another source, as described in the section Copy data from another source into an Access table.
- To rename a column (field), double-click the column heading, and
then type the new name.
It is a good practice to give a meaningful name to each field, so that you can tell what it contains when you see it in the Field List pane. - To move a column, click its heading to select the column, and then drag the column to the location you want.
- You can also select multiple contiguous columns and then drag them to a new location all at once. To select multiple contiguous columns, click the column header of the first column, and then, while holding down SHIFT, click the column header of the last column.
Create a table, starting in Design view In Design view, you first create the new table's structure. You then switch to Datasheet view to enter data, or enter data by using some other method, such as pasting, or importing.
- On the Create tab, in the Tables
group, click Table Design
.
- For each field in your table, type a name in the Field Name
column, and then select a data type from the Data Type
list.
Note If you don't see the Field Name and Data Typecolumns, you might be in Datasheet view instead of Design view. To switch to Design view, right-click the table in the Navigation Pane, and then click Design View . Access prompts you for a name for the new table, and then switches to Design view.
- If you want, you can type a description for each field in the Description column. The description is then displayed on the status bar when the cursor is located in that field in Datasheet view. The description is also used as the status bar text for any controls in a form or report that you create by dragging the field from the Field List pane, and for any controls that are created for that field when you use the Form Wizard or Report Wizard.
- After you have added all of your fields, save the table:
- Click the Microsoft Office Button and then click Save, or press CTRL+S.
- You can begin typing data in the table at any time by switching to Datasheet view and clicking in the first empty cell. You can also paste data from another source, as described in the section Copy data from another source into an Access table.
Create a table by using a template Access provides templates for commonly-used types of tables. With a single mouse click, you can create a complete table structure with fields already configured and ready for use. If needed, you can then add or remove fields so that the table fits your needs.
- On the Create tab, in the Tables group, click Table Templates and then select one of the available templates from the list.
- To add data, begin typing in the first empty cell or paste data from
another source, as described in the section Copy data from another source
into an Access table.
- To delete a column
Right-click the column heading, and then click Delete Column.
- To add a new column
On the Datasheet tab, in the Fields & Columns group, click New Field.
Access displays the Field Templates pane, which contains a list of commonly used field types. If you double-click or drag one of these fields into your datasheet, Access adds a field by that name and sets its properties to appropriate values for that type of field. You can change the properties later, if you want. If you drag the field, you must drag it onto an area of the datasheet that contains data. A vertical insertion bar appears, showing you where the field will be placed.
- To delete a column
- Save the table:
- Click the Microsoft Office Button
and then click Save, or press CTRL+S.
- Click the Microsoft Office Button
Set field properties in Design view Regardless of how you created your table, it is a good idea to examine and set field properties. This can only be done in Design view. To switch to Design view, right-click the table in the Navigation Pane and then click Design View. To see a field's properties, click the field in the design grid. The properties are displayed below the design grid, under Field Properties.
To see a description of each field property, click the property and read the description in the box next to the property list under Field Properties. You can get more detailed information by pressing F1.
The following table describes some of the field properties that are commonly adjusted.
Property | Description |
Field Size | For Text fields, this property sets the maximum number of characters that can be stored in the field. The maximum is 255. For Number fields, this property sets the type of number that will be stored (Long Integer, Double, and so on). For the most efficient data storage, it is recommended that you allocate the least amount of space that you think you will need for the data. You can adjust the value upwards later, if your needs change. |
Format | This property sets how the data is displayed. It does not affect the actual data as it is stored in the field. You can select a predefined format or enter a custom format. |
Input Mask | Use this property to specify a pattern for all data that will be entered in this field. This helps ensure that all data is entered correctly, and that it contains the required number of characters. For help about building an input mask, click at the right side of the property box. |
Default Value | Use this property to specify the default value that will appear in this field each time that a new record is added. For example, if you have a Date/Time field in which you always want to record the date that the record was added, you can enter "Date()" (without the quotation marks) as the default value. |
Required | This property sets whether a value is required in this field. If you set this property to Yes, Access does not allow you to add a new record unless a value is entered for this field. |