MS Access Tutorial - 2023 - Table
MS Access Tutorial - 2023 - Table
MS Access Tutorial - 2023 - Table
MS Access Tutorial
MS Access Tutorial
In this tutorial you are required to create a database for a simple invoicing system. You are
required to create 4 tables, data added to these tables, queries to obtain information from the
database, and reports to display information from the database.
The database contains the following tables and attributes with the stated data types and sizes:
Give the database a suitable name SimpleInvoicingSystem and choose a folder to save it to
by clicking the folder icon.
Click Create
Creating Tables
Steps for creating a Table
1. Click Create →Table Design
2. Enter Field names, data types, and descriptions (optional)
3. Enter properties for fields
4. Set the primary key(s)
5. Save the table design (and name the table)
Save and name the table TblCustomer (can save by closing the table or by using the save
button).
BE1255 – IT for Business 4
MS Access Tutorial
In the first Field Name type CustomerID, change the data type to Number, add a description,
and in the Field Properties section, change Indexed to ‘Yes (no duplicates)’ using the
dropdown arrow.
The CustomerID is going to be the Primary Key, so with the CustomerID field selected, click
the Primary Key button on the ribbon. Notice the key which now appears next to CustomerID.
BE1255 – IT for Business 5
MS Access Tutorial
Move down to the next row, and type CustomerFirstName in the field name cell, choose Text
as the data type, add a suitable description.
In the Field Properties Box, change the Field Size to ‘50’, and Required to ‘Yes’
Now add the rest of the Attributes with the properties given. (Refer to the table in Page 1)
To create the relationship, click and drag the primary key attribute to the appropriate attribute
in the related table:
Tick Enforce Referential Integrity. This is done by enforcing referential integrity which means
that before a value can be entered into the foreign key attribute, it must already exist in the
table containing the primary key.
Notice that the Relationship Type is One-To-Many, this means one CustomerID could relate
to many Order records.
Click Create.
Notice the link which has now been created between the TblCustomer and the TblOrder.
The 1 at the Customer table end means 1 customer record could be related to many (∞) order
records.