Create Table (Table) in Access 2016

The objects in the database depend a lot on the table, you should always start designing your database by creating all the tables.

When creating a database, you will store your data in Table objects. Objects in the database depend a lot on the table, you should always start designing the database by creating all tables, then new objects. Before creating a table, carefully review your requirements and identify all the tables you need.

Create the Datasheet View table

Let's try to create the first table, storing basic information of Company employees as follows:

School's name
Datatypes
NhanvienID AutoNumber Ten Short Text Ho Short Text Diachi1 Short Text Diachi2 Short Text Short Text Thanhpho Short Text Mabuudien Short Text Dienthoai Short Text

According to the table above, we have the Short Text data type that applies to all data fields. Next, open an empty database in Access.

Picture 1 of Create Table (Table) in Access 2016

This is the area we will work with. When opening an empty database, Access automatically in the Datasheet View table mode .

Now that we switch to the Field tab, you'll see that the ID field is automatically set to the AutoNumber data type, which is the unique ID and the primary key in this table.

Picture 2 of Create Table (Table) in Access 2016

The ID field is already created, now we rename it to suit our requirements. Click Name & Caption in the Ribbon and you will see a dialog box appear.

Picture 3 of Create Table (Table) in Access 2016

Picture 4 of Create Table (Table) in Access 2016

Change the name of this field to NhanvienID to match the created table. Enter other optional information if you want and click OK .

Picture 5 of Create Table (Table) in Access 2016

Now let's add some fields by clicking Click to add .

Picture 6 of Create Table (Table) in Access 2016

Select the Short Text data type and enter a name in all fields.

Picture 7 of Create Table (Table) in Access 2016

When all fields are fully added, click the Save icon to bring up the Save As dialog box, enter the table name into the Table Name for the newly created table.

Picture 8 of Create Table (Table) in Access 2016

You may wonder, the prefix tbl stands for table . Click OK and you will see the table appear in the navigation pane.

Picture 9 of Create Table (Table) in Access 2016

Create the Design View table

In the example above Quantrimang created the Datasheet View table. Now we will create another table using Table Design View on a project, including the following fields:

School's name
Datatypes
DuAnID AutoNumber TenDuAn Short Text BienTap Short Text TacGia Short Text TinhTrang Short Text HopDong Attachment TimeBatdau Date / Time Time Date / Time NganChang Currency Write Long Text

Next go to the Create tab .

Picture 10 of Create Table (Table) in Access 2016

Click Table View , you can see this interface field name and data type will be placed side by side, completely different from Datasheet View.

Picture 11 of Create Table (Table) in Access 2016

Now we need to set DuAnID as the primary key for this table, select DuAnID and click the Primary Key option in the ribbon.

Picture 12 of Create Table (Table) in Access 2016

You can now see a small key icon that will display next to that field.

Next, save and name this table.

Picture 13 of Create Table (Table) in Access 2016

Click OK. You can also edit this panel to the Datasheet View format by clicking the View button in the left corner of the Ribbon

Picture 14 of Create Table (Table) in Access 2016

If you want to edit this or any specific field, you can edit it directly in this form, without having to go back to Design View to change it. For example, update the TinhTrang field as shown below.

Picture 15 of Create Table (Table) in Access 2016

Click Ok to see the changes.

Picture 16 of Create Table (Table) in Access 2016

Previous article: Data types in Access 2016

Next lesson: Working with Table in Access 2016

Update 07 June 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile