How To Create Table for Beginner: MS Access

Overview:

Table in MS Access database is a collection of data stored as a group. You can use to store a group of employee information in the employee table or customer information in the customer table. A table consists of records and fields similar to Rows and Columns in MS Excel.

 

AccessTable  Excel-Table

 

datatypeField Data Types:

Every table is made up of fields.  A field’s data type determines what kind of data the field can store. There are 12 types of data type for each field as listed on the picture. You can choose the data type for the field corresponding to your field name. For example, you can use Text data type for your CustomerName field or Date data type for OrderDate field.

Erectile dysfunction viagra on line australia find out content is much more common than people think. If you are unaware of the ePSA error cialis buy on line check this site out codes, or if you have not encountered one yet, then it is advisable to look for doctor for certain help. The urea cycle consists of five reactions, and cialis 5mg discount citrulline is formed in the second of these. You can have this drug in fruity and exotic flavors which would help you to get an idea about the popularity of the company. viagra france

 

propertyField Properties:

The properties of a field describe the characteristics and behavior of data that added to each field. Under the General tap on the table design view, you will see the list of a Customer_Phone field’s properties starting with Field Size, Format, Input Mask, Caption, etc. You can choose a telephone format of (206) 555-1212 from the Input Mask Wizard (…) for the Customer_Phone field which is shows as !\(999”) “000\-0000;; or use the greater operator sign (>) on format property to convert a text to a Capital letter in a text field.

 

Create New Table:

For MS Access 2007+, you can create a new table by clicking on the Table or Table Design under the Create Menu.

 selectDesign

 

 

 

 

By using the Table, you will see the datasheet table generates naming Table1. The blank table will start with the ID field and Blank field (Click on Add).

  1.  Right hand click on ID field then select Rename Field
  2. Right hand click on a blank field (Click to Add)
  3. Select a type of field such as a text for CustomerName or Currency for a Price field
  4. Add more field as you want

By using the Table Design, you will design your own table from the blank table. You will need to enter a field name and data type for that field.

  1.  Click on the Table Design under the Create Menu
  2. Enter a field and a data type for that field
  3. Repeat step 2 for all fields you want
  4. Save and name your table

 table-design

Set Primary Key: Primary key is set to the field that uniquely identify each record stored in the table. For a primary key to work well, the field must uniquely identify each row, never contain an empty or null value. To set the primary key:

  1. Select the field or fields that you want to use as the primary key.
  2. To select one field, click the row selector for the field you want.
  3. On the Design tab, in the Tools group, click Primary Key.
  4. A key indicator is added to the left of the field that you specify as the primary key.

primary-key

Create a table field links to another table

In the tbl_Customer table, we have a Customer_Type_ID field that is a link field to the CustomerType table called a lookup table. The CustomerType table has a Customer_type_id and Customer_Type field. The customer type information can be used many times in the Customer table or many customers may have the same customer type. To eliminate the duplicated typing and be consistent for the input of customer type, we need to use a lookup or link field for the customer_type on the customer table. We just want to select the customer type from the drop-down list on the Customer table.

customertype

 Step by Step to create a link field or lookup field

1. Under the table design view, select a data type “Lookup Wizard” for a new field

tableTypelink

2. Select “I want to lookup field to get the values from another table or query” then click Next>

lookupwizard

3. Select the tbl_Customer_Type table on the table list then click Next>

selecttable

4. Import both Customer_Type_Id and Customer_Type fields

5. Check on “Hide key column” to hide the primary key field. It will show only the Customer Type on the dropdown list on the Customer table

hideprimary

6. Click Finish to complete the process. The relationship of two tables will show below:

relationship

 

Related Video Link:

Related posts