0% found this document useful (0 votes)
20 views12 pages

Unit8. MS Access - Create Tables

Uploaded by

Kusum Paudel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views12 pages

Unit8. MS Access - Create Tables

Uploaded by

Kusum Paudel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Generated by Clearly Reader

MS Access - Create Tables


4:26 Estimated 930 Words EN Language

MS Access Tutorial
MS Access - Home
MS Access - Overview
MS Access - RDBMS
MS Access - Objects
MS Access - Create Database
MS Access - Data Types
MS Access - Create Tables
MS Access - Adding Data
MS Access - Query Data
MS Access - Query Criteria
MS Access - Action Queries
MS Access - Create Queries
MS Access - Parameter Queries
MS Access - Alternate Criteria
MS Access - Relating Data
MS Access - Create Relationships
One-To-One Relationship
One-To-Many Relationship
Many-To-Many Relationship
MS Access - Wildcards
MS Access - Calculated Expression
MS Access - Indexing
MS Access - Grouping Data
MS Access - Summarizing Data
MS Access - Joins
MS Access - Duplicate Query Wizard
Unmatched Query Wizard
MS Access - Create A Form
MS Access - Modify A Form
MS Access - Navigation Form
MS Access - Combo Box
MS Access - SQL View
MS Access - Formatting
MS Access - Controls & Properties
MS Access - Reports Basics
MS Access - Formatting Reports
MS Access - Built-In Functions
MS Access - Macros
MS Access - Data Import
MS Access - Data Export
MS Access Useful Resources
MS Access - Quick Guide
MS Access - Useful Resources
MS Access - Discussion
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who

When you create a database, you store your data in tables. Because other database objects depend so
heavily on tables, you should always start your design of a database by creating all of its tables and then
creating any other object. Before you create tables, carefully consider your requirements and determine all
the tables that you need.

Let us try and create the first table that will store the basic contact information concerning the employees
as shown in the following table −

Field Name Data Type

EmployeelD AutoNumber
FirstName Short Text

LastName Short Text

Address1 Short Text

Address2 Short Text

City Short Text

State Short Text

Zip Short Text

Phone Short Text

Phone Type Short Text

Let us now have short text as the data type for all these fields and open a blank database in Access.

This is where we left things off. We created the database and then Access automatically opened up this
table-one-datasheet view for a table.
Let us now go to the Field tab and you will see that it is also automatically created. The ID which is an
AutoNumber field acts as our unique identifier and is the primary key for this table.

The ID field has already been created and we now want to rename it to suit our conditions. This is an
Employee table and this will be the unique identifier for our employees.

Click on the Name & Caption option in the Ribbon and you will see the following dialog box.
Change the name of this field to EmployeeID to make it more specific to this table. Enter the other
optional information if you want and click Ok.

We now have our employee ID field with the caption Employee ID. This is automatically set to auto
number so we don't really need to change the data type.

Let us now add some more fields by clicking on click to add.


Choose Short Text as the field. When you choose short text, Access will then highlight that field name
automatically and all you have to do is type the field name.

Type FirstName as the field name. Similarly, add all the required fields as shown in the following
screenshot.

Once all the fields are added, click the Save icon.

You will now see the Save As dialog box, where you can enter a table name for the table.
Enter the name of your table in the Table Name field. Here the tbl prefix stands for table. Let us click Ok
and you will see your table in the navigation pane.

Table Design View

As we have already created one table using Datasheet View. We will now create another table using the
Table Design View. We will be creating the following fields in this table. These tables will store some of
the information for various book projects.

Field Name Data Type

Project ID AutoNumber

ProjectName Short Text

ManagingEditor Short Text

Author Short Text

PStatus Short Text

Contracts Attachment

ProjectStart Date/Time
ProjectEnd Date/Time

Budget Currency

ProjectNotes Long Text

Let us now go to the Create tab.

In the tables group, click on Table and you can see this looks completely different from the Datasheet
View. In this view, you can see the field name and data type side by side.
We now need to make ProjectID a primary key for this table, so let us select ProjectID and click on
Primary Key option in the ribbon.
You can now see a little key icon that will show up next to that field. This shows that the field is part of the
table’s primary key.

Let us save this table and give this table a name.

Click Ok and you can now see what this table looks like in the Datasheet View.
Let us click the datasheet view button on the top left corner of the ribbon.

If you ever want to make changes to this table or any specific field, you don't always have to go back to the
Design View to change it. You can also change it from the Datasheet View. Let us update the PStatus field
as shown in the following screenshot.
Click Ok and you will see the changes.

Advertisements

You might also like