Blog
Intel i5 vs i7: Ultimate Showdown
What is Core in a Processor? A core is a unit frequently known as the Central Processing Unit...
Microsoft Access is a Database Management System offered by Microsoft. It uses the Microsoft Jet Database Engine and comes as a part of the Microsoft Office suite of application.
Microsoft Access offers the functionality of a database and the programming capabilities to create easy to navigate screens (forms). It helps you analyze large amounts of information, and manage data efficiently.
Now in this Microsoft Access tutorial, we will learn about some important terms and basic objects in MS Access:
It is a file which stores the entire database. The database file is saved to your hard drive or other storage devices.
Datatypes are the properties of each field. Every field has one datatype like text, number, date, etc.
Macros are mini computer programming constructs. They allow you to set up commands and processes in your forms, like, searching, moving to another record, or running a formula.
Modules are procedures(functions) which you can write using Visual Basic for Applications (VBA).
MS Access common data types are listed below:
Type of Data | Description | Size |
Short Text | Text, including numbers which does not need calculation. (e.g., Mobile numbers). | Up to 255 characters. |
Long Text | This data type is used for lengthy text or alphanumeric data. | Maximum 63, 999 characters. |
Number | Numeric data type used for storing mathematical calculations. | 1, 2, 4, 8, and 16 bytes. |
Date/Time | Store Date/time for the years 100 through 9999. | 8 bytes. |
Currency | It allows you to store currency values and numeric data with one to four decimal places. | 8 bytes. |
Auto Number | Assign a unique number or assigned by Microsoft Access when any new record is created. Usually used as the primary key | Four bytes (16 bytes if it is set as a Replication ID). |
Yes/No | It only stores logical values Yes and No. | 1 bit |
Attachment | It stores files, such as digital photos. Multiple files can be attached per record. | Up to 2 GB Data can be stored. |
OLE objects | OLE objects can store audio, video, other Binary Large Objects. | Up to 2 GB data can be stored. |
Hyperlink | Text or combinations of text and numbers stored. That text is used as hyperlink address. | Each part of a Hyperlink data type allows you to store a maximum 2048 characters. |
Calculated | Helps you to create an expression that uses data from one or more fields. | You can create an expression which uses data from one or more fields. |
Microsoft Access and Excel are very similar yet very different. Here, are some important difference points between both of them-
Access | Excel |
Deals with text, numbers, files and all kinds of data | Microsoft Excel generally deals with numerical data |
All the data is stored one time, in one place. | Lots of worksheets or documents are a store with similar, repeated data. |
Helps you to build highly functional data entry forms and report templates. | Only the primary data entry screen is available. |
Users will be able to enter the data more efficiently and accurately. | Data accuracy and speed is not much because of the format. |
Now in this MS Access Tutorial, we will learn the pros/benefits for using MS Access application:
Here, are the cons for using MS Access
Note: We assume you have the latest Microsoft Access installed which comes bundled with Microsoft Office 365 package.
There are two ways to Start MS Access.
Now in this Microsoft Access tutorial, let's have a look of starting MS Access using both the ways:
Step 1) Click on the 'Windows' icon. You will find the list of installed programs.
Step 2) Check and click on Access Icon.
Step 3) MS Access Application window will appear
Steps 4) Press 'Esc'
Result: This will open the MS Access windows application
Step 1) Right Click from Desktop and Click 'New'
Step 2) Click on 'Microsoft Access Database Option'
Step 3) Below MS Access Application window will appear
Step 4) Press 'Esc'
Result: This will open the MS Access windows application
Before we create a Database, lets quickly understand the holistic picture of what Database is, with particular reference to MS Access.
Let's, start with a few real-life Microsoft Access databases example:
Similarly, we have MS Access Database is a kind of home for all your Tables, Queries, Forms, Reports, etc. in MS Access which are interlinked.
Technically, Database store the data in a well-organized manner for easy access and retrieval.
There are two ways to create Database in SQL Access:
Let's go into the detail of each:
Steps to create Database from Template
Step 1) With MS Access application open, Click on File.
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 reverence.
Step 3) File name box will appear with the default file name.
Step 4) Enter the new Name.
Step 5) Click on 'Create.'
Result: Guru99_Contact Database created and below window will appear.
Step 6) Optionally, you can click on any of the objects from left navigation pane and open that object for further references and work.
For, E.g., Clicking on 'Contact Detail' form will open 'Contact Detail' form as displayed below.
Step 1) With MS Access application open, Click on File > New
Step 2) Click on 'Blank Database.'
Step 3) File name box will appear with the default file name.
Step 4) Enter the new name.
Step 5) Click on 'Create.'
Result: Guru99 Database created and below window will appear.
The first step in this Microsoft Access tutorial to store data in the database is creating a Table where data will reside. Post creation of the table, we can keep inserting the rows in the table.
There are two ways to create Database in MS Access
Step 1) First Click Create tab. Then from Tables group, click Table.
Step 2) System will display the default table created with 'Table1' 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 5) Column will be added with the default name as 'Field1.'
Step 6) Click on Header and rename as 'COURSE_NAME.'
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'
Result: Name, Caption, and Description now exist.
Step 1) First Click Create tab. Then from Tables group, click Table.
Step 2) Table Dialog box appears. For each Field enter Filed Name, Data Type and Description.
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:
Steps 4) Press 'Ctrl+S.' Enter the Table Name and Click OK
Result:
Now in this MS Access tutorial, we will learn how to switch views between Datasheet and Design:
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.
Step 1) Click on Datasheet View
Result:
Let's add some data in your table by opening the Access database you have created earlier.
Step 1) Select the 'Course' table
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:
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.
To understand form lets first create two new Record in Contact Table (from the prebuilt Contact Database discussed here)
Step 1) Select the 'Contact' table from Left Navigation.
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.
There are four primary ways to create the form as mentioned below:
Let's have a look at each option to create the form, one by one:
This option allows the user to create the form with the wizard and select the column from the available list of column form in legacy Select window format.
Step 1) Click on 'Form Wizard.'
Step 2) System will display below the screen.
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.
It is the simplest way to create the form which will:
Step 1) Select the table for which we want to create the form and click on 'Form.'
Step 2) Below window will appear.
Step 3) Right-click on any cell which we don't want to be part of final forms and click on 'Delete.'
Result: 'Fax Number' field does not exist now.
Step 4) Press 'Ctrl+S' and enter new Form Name as 'Contact_Form2'. Click 'OK'.
Result: New form with the name as 'Contact_Form2' exists under the "Forms" section.
It is another type wherein All the records already created will be displayed in Form with an option to Add new record.
Step 1) From the 'Create' tab. Click on 'More forms' and select 'Multiple Items.'
Result: Below Multiple lines, the window will appear
Step 2) Press 'Ctrl+S'. Enter the new form name and click 'OK.'
Result: New Form with the name as 'Contact_Form_Multiple_Item' exists under the "Forms" section.
It is a mix of simple form and split form in a way that this form provides the view of Form and datasheet in a split window.
Whatever the user enters in Form is visible directly in Datasheet view immediately and vice versa.
Step 1) From the 'Create' tab, click on 'More forms' and select 'Split Form.'
Result: Below window will appear with the Form and data sheet together.
Step 2) Press 'Ctrl+S' and enter the new form name. Click 'OK.'
Result: New Form with the name as 'Contact_Form_Split' exists under the "Forms" section.
Let's have a look at how to edit value from the form:
Step 1) Click on 'Contact_Form'
Step 2) Update some values on 'Contact_Form' value
Step 3) Double Click on 'Contact' table.
Result: Updated value is present in the original table record.
Step 1) Open 'Contact_Form_Split'
Step 2) To Add record, click on 'New (blank) Record Icon.'
Result: New record window appear in:
Step 3) Manually fill the data from Form. Note that in split form all data will be automatically reflected in below data sheet as well.
Step 4) Double Click on 'Contact' table.
Result: New Record updated to 'Contact' Table added from Form 'Contact_Form_Multiple_Item'
Let's take an MS Access databases example of 'Contact' DB default report – 'Phone Book.'
Step 1) Click on 'Phone Book' under 'Report' section. The system will open the inbuilt 'Phone Book' report.
It will display Contact Name, Home, Business and Mobile name displayed
for each record present.
Step 2) Now suppose that we want to edit the report Heading from 'Home' to 'Home Number.' Right click and click on 'Design View.'
The system will open the Report in Design view.
Step 3) Edit the name you want to update and Press 'Ctrl+S'.
Step 4) Double click 'Phone book' under reports
Result: Label is updated from 'Home' to 'Home Phone.'
Let take an Microsoft Access databases example of 'Contact' DB default Macro – 'AutoExec.'
Step 1) Click on 'AutoExec' under 'Report' section. The system will open the inbuilt 'Welcome' Macro. It will display Welcome note and other data related to contacts Database which has its code into default 'AutoExec' Macro
Step 2) If you want to see the code behind this macro right click.
Result:
MS Access databases example from 'Contact' DB
Step 1) Click on 'modMapping'
Result:
What is Core in a Processor? A core is a unit frequently known as the Central Processing Unit...
What is R Software? R is a programming language and free software developed by Ross Ihaka and...
What is Variable? A variable is a concept or theoretical idea which can be described in measurable terms....
Monitoring the temperature of the processor is essential because it can affect the performance of...
In this tutorial, we will take you through step by step process to install Apache Hadoop on a...
What is CI? Continuous integration is a software development method where members of the team can...