MS Access Lab
MS Access Lab
Now in this Microsoft Access tutorial, let’s have a look of starting MS Access using both the
ways:
Before we create a Database, lets quickly understand the holistic picture of what
Database is, with particular reference to MS Access.
Technically, Database store the data in a well-organized manner for easy access and
retrieval.
Result: The below window will appear. All the Database templates are displayed below.
Step 2) We can select any template by clicking on it. Click on Contact Template for further
Step 3) File name box will appear with the default file name.
For, E.g., Clicking on ‘Contact Detail’ form will open ‘Contact Detail’ form as displayed
below.
Step 3) File name box will appear with the default file name.
https://www.guru99.com/ms-access-tutorial.html 14/50
Step 4) Enter the new name.
Step 3) To Rename Column, double click on Column Header and enter the new column
Name.
Note that the Data type of Course_ID is ‘AutoNumber.‘ Hence this is also the Unique Key
of the table.
Step 4) You can Add Column by clicking on any category from the ‘Add & Delete’ group.
Alternatively, you can also add a column by clicking on ‘Click to Add’
For Example, click on ‘Short Text’ from the ‘Add & Delete’ group.
Step 7) Press ‘Ctrl + S’ and Enter the new table name to save the table.
Step 8) You can also save new Name, Caption and Short description for any Column by
clicking on ‘Name and Caption.’ Click on it
Step 9) Dialog Box will appear. Add the following and Click on ‘OK’
Steps 3) To Add Course_ID as Primary Key, select it and Click on ‘Primary Key.’ Course_Id
will be Preceded by KEY ICON as shown below:
To switch views, between the datasheet (spreadsheet view) and the design view, click the
‘View’ button in the top-left hand corner of the Access Ribbon (shown in the
Home/Help/Design Tabs). And Click on the View you need to display.
For Example: Let’s Assume You want to switch to the newly created table
‘Course_strength’ from ‘Design view’ to ‘Data Sheet’ View.
Let’s add some data in your table by opening the Access database you have created
earlier.
Steps 2) Select the Datasheet view option in the ribbon and add some data by entering
the values in It. Updated Data will be Autosaved.
Now let’s say You want to delete 4th row with ‘My SQL’ as Course name.
Step 3) Select the row by clicking on the leftmost column and Right Click on the row. The
options menu will appear with the ‘Delete Record’ Option
Step 4) Popup Window will appear to confirm the deletion of the record. Click ‘OK’
Result:
Summarizing views:
Datasheet View:
Displays in the view, which allows you to enter raw data into your database table.
Design view:
Displays the view, which allows you to enter fields, data types, and descriptions into your
database table.
A form is a database object that you can use to create a user interface for a database
application.
It mainly used to ease the process of data entry or editing.
Data in a form can be selected from one or more tables.
Forms can also be used to control access to data, like which fields or rows of data are
visible to which users.
Forms have a Form View.
Help you to display live data with easy creation of new data.
To understand form lets first create two new Record in Contact Table (from the prebuilt
Contact Database discussed here)
Step 2) Create two rows by entering some relevant data in two rows.
create Form, and then we will see how forms can be leverage for easy display, editing,
and creation of new data.
Form Wizard
Form
Multiple Item
Split Form
Let’s have a look at each option to create the form, one by one:
Step 3) Select the columns which you want to be there in final form.
Result: ID is selected
Step 4) Keep selecting all required column as explained in Step 3 above and then click
‘Next.’
Step 5) Layout selection box will appear which allows the user to select the different type
of form layout. Click ‘NEXT’
Step 6) Enter the name of the form as “Contact_Form” and click ‘Finish.’
Result: Contact_Form now exist with all column displayed which are there in step 4 in the
Selected column list.