Anda di halaman 1dari 19

Questions And Discussion

Question 1
How to Create Table in Microsoft Access 2010

After you created new blank database you will see one table is created named
Table1 which is not yet save. If you do not prefer to continue with that default table
just click on the x button on the right hand side without saving.
Click on Create Tab
1. Click on Table Design Button

You will see the table designation windows appear


2. Enter fields name and its data type as below:

3. Set field stdid to Primary Key (Not allow duplicate data for stdid) by Right
Click on that field and choose Primary Key:

4. Click <Ctrl-S> to Save the Table:

Question 2
How to Create a Query
1. Select the Create tab on the Ribbon, and locate the Queries group.
2. Select the Query Design command.

3. Access will switch to Query Design view. In the Show Table dialog
box that appears, select the table you would like to run a query on.
Click Add, then click Close. We are running a query about our
customers, so we will add the Customers table.

4. The selected table will appear as a small window in the Object


Relationship Pane. In the table window, double-click the field
names you would like to include in your query. They will be added to
the Design Gridin the bottom part of the screen.

In our example, we want to mail invitations to customers who live in a


certain area, so we'll include the first and last name, street
address, city, state, and zip code fields. We aren't planning on calling
or emailing our customers, so we don't have to include
the telephone or email fields.

5. Set the search criteria by clicking on the cell in the Criteria: row of
each field you would like to filter. Typing criteria into more than one field
in the Criteria: row will set your query to include only results that meet
all the criteria. If you want to set multiple criteria but don't need the
records shown in your results to meet them all, type the first criteria in
the Criteria: row and additional criteria in the Or: row and the rows
beneath it.
For this one-table query, we'll use very simple search criteria.
o

We want to find our customers who live in a city called Raleigh,


so in our City field, we'll type "Raleigh". Typing "Raleigh"
in quotation marks will retrieve all records with an exact match for
"Raleigh" in the City field.

Some customers who live in the suburbs live fairly close, and
we'd like to invite them as well. We'll add their zip code, 27513, as
another criteria. Since we want to find customers who either live in
Raleigh or in the 27513 zip code, we'll type "27513" in the or: row of
the Zip Code field.

6. After you have set your criteria, run the query by clicking
the Run command on the Query Tools Design tab.

7. The query results will be displayed in the query's Datasheet View,


which looks like a table. If desired, save your query by clicking
the Save command in the Quick Access toolbar. When prompted to
name it, type in the desired name, then click OK.

Question 3
How to create a Form
Launch Access, create tables and define relationships among them. For
demonstration purpose I have added four tables in database, build relationships
among them with enforcing referential integrity and cascaded (update and delete)
related fields.
1. Relationship among tables can be seen in the screen shot below.

~For pulling out data from tables, query is created that automatically fills in the
corresponding fields.

2. When we will fill Addictive_ID field, query will automatically pull out
corresponding row (Student Name, Phone No and Address) from original
tables.
3. To begin with creating forms navigate to Create and click Form.

4. Access will automatically create the Form, show it in Form layout view and
assign the name of query used. You can also select Form Design, Blank
Form or Form Wizard to create forms.

~You can add labels, buttons, text boxes, images and graphs to make the process of
entering and working with data much easier and more accurate.
5. Navigate to View drop-down menu and click Design.

6. Now Head over to Design tab and select Button to insert button in the Form

Question 4
How To create a reports
1. Launch Access, create tables and define relationships among them. For demonstration
purpose I have added four tables in database, build relationships among them with
enforcing referential integrity and cascaded (update and delete) related fields.

2. Relationship among tables can be seen in the screenshot below.

3. For pulling out data from tables, query is created that automatically fills in the
corresponding fields.

4. When we will fill Addictive_ID field, query will automatically pull out corresponding row
(Student Name, Phone No and Address) from original tables.
To begin with creating reports, navigate to Create and click Report Wizard.

5. You will reach a Report Wizard dialog, Select the query which contains all the
relationships among tables, and hit Add button. You will see all the fields of the tables
move to Selected Fields. Click Next.

6. In this step you can choose the desired report view. Click Next to proceed further.

7. Now you can choose any grouping levels you want to add, if you want to view report
through a certain group and and change priorities, click the add (>) button. But we will
stick with the default settings for it. Click Next.

8. Here you can specify sorting order (Ascending or Descending) for the records but we will
leave these options. Click Next to proceed further.

9. Select the layout of the report in this step, select Justified from the right pane and
enable Adjust the field width option, to take a better and compact view of the report.

10. Finally choose appropriate name for the report. You can either select Preview the
report or Modify the reports design to view report in design view to perform more
operations. Click Finish to end the report.

11. Now you can see the report is created through the Report Wizard. You can apply new
themes over the report to make it look more professional.

Question 5
How to creat a Relationships
1. Launch Access 2010, navigate to Database Tools on new Access ribbon and
click Relationships button.

2. Access will open Relationships tab with Show Table Dialog box. Select tables,
queries or both, and hit Add.

3. You will see selected tables/queries small windows with columns names
in Relationships window. In this example I am using only four tables
(AddictiveTips Example, Courses, Lecturer, Mark Sheet).

4. You will see one-many relationship created between AddictiveTips Examples


ID and course code.

5. To create one-one
relationship with
enforcing referential
Integrity,
~Hold AddictiveTips
Examples ID, drag and
drop it over Mark
Sheets Id.
~Edit
Relationship dialog box
will appear.
~Now enable Enforce Referential Integrity (ensure consistency & validates
~corresponding entries) & Cascade Delete Related Recordscheckbox
(ensures removal of all related data from Mark Sheet when AddictiveTips
Examples ID is deleted ).

6. These three options are similar to SQLs inner join, outer join and right
outer join. Select a join type and Hit OK.

7. Click Create to make 1-1 relationship between AddictiveTips Examples


ID and Mark Sheets Id.

~This is the simplest form of relationships among tables/queries. It becomes much


complex and elusive as it grows.

8. Relationships make it possible to co-relate and ensure data consistency from


table to table. Now you can unleash power of Access 2010 by creating more
tables and making relationships with them.