We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
Microsoft Access
Practical 1 is
Perform the following tasks In MS Access and write the stepwise procedure:
e
f.
g.
Proce:
. Create a.table with the following fiel
Create a new database and name it "PU-Exam"
Stc_ID, Std_name, Marks, Grade
Set Std_ID os primary key and save ihe table as "Physics_Resull”,
i. Insert the following data in fhe table.
‘Std_ID_| Std name | Marks | Grade
1001__| Usman __ | 88 At
1002 Ammar 80 A
1003__| Hasan [75 Bt
Sort the records by Std_name alphabetically.
Wiite a query in design view to select all he students having marks greater than 80.
ct all the students with grade A.
Base,
write a query in design view to sele
dure Uscle, the TV sleps bo Coeale, cle,
a, Creating the Database _
Aone
OPN aAW
. Select All Pros i
Click Office button. The Office menu appears.
1. Click Ne'
3. Type "PU-Exam” in Fil
. Change the location of tt
. Click Create. The ni
ograms > Microsoft Office > Microsoft Office Access 2007, The Access 2007 will start,
w. The Getting Started with Microsoft Office Access window appears.
Click Blonk Database in New Blank Database section in center pane, Tho Blank Database pano
opens on the right side of the window.
le Name box.
he file by clicking Folder Icon nox! to Fila Name box.
Select the desired location.
Click OK.
ew database will be created,b. Creating the Table
the Table Design view wincow GppSas.
LS
Zz
a
4
&
é
a
Cick Create tx.
Cex Table Design in Tables BOuD-
Type feid name Sid JD in Field Name column.
Press Tab key 10 move to Data Type column.
Click the oon ond ect Mumber from the crop-Gown ist.
Pres Tab key to move to Description column. It is optional
Repeat steps 3 to 6 until off fiekis have been defined.b. Creating the Table
Click Create tab.
Click Table Design. in Tables group. The Table Design view window appears.
Type field name Std_ID in Field Name column:
Press Tab key to move to Data Type.column.
Click the arrow and select Number from the drop-down list.
Press Tab key to move to Description column. It is optional.
Repeat steps 3 to 6 until all fields have been defined.
MEAP en>
c. Setting the Primary Key
1, Select Std_ID. :
2. Click Primary Key in Tools group on Design tab. A key icon appears to the left of the field.ec a Dna reer
3. Click Office button and click Save button OR click Save icon on Quick Access Toolbar OR right
click table name on objéct tab and select Save. The Save As dialog box will appear.
4. Type "Physics Result” in Table Name box.
5. Select OK. The Save As dialog closes and the table will be saved.
d. Inserting the Records
1. Click Datasheet: View from View drop-down arrow ‘in’ Views group on Home tab OR click
Datasheet View on the status bar. The table will appear in Datasheet view.
[Pivot Tabte View | FE
Fea nome PENG
Pivot Chant View | [Design View
Type "1001" in Std_ID field.
Press tab to move.the cursor to Std_Name field and type "Ali".
Press tab to move the cursor to’Marks field and type "88";
Press tab to move the cursof to Grade field and type "A+".
Repeat the steps 2 to 5 to.add all records.
se eey”
1002 Usman 808
1003 Hasan 75 B+e, Sorting the Records
1, Open the table in Datasheet view.
2. Click the drop-down arrow at the top of the Std_Name field, The menu appears.
3. Select Sort A to Z option. The records will be sorted in ascending order according !o $4,
ASS
WH ewe ioe troe i Kame
teagan
OR
1. Click anywhere in the Std_Name column.
2. Click Sort Ascending (A to Z) in Sort & Filter on Home tab. The records will be sorted in osc.
order according to Std_Name.
2. Click Query Design in Other group. The Show Table dialog box appears.
rome 7%
quo 80,
Lenore
3. Click the table Physics_Result.Section B => Microsoft Access
21
4. Click Add, ”
Click Close to close Show Table Giolog box. The table appears in the upper port of Query
Designer window. The bottom part Ssplays design gid that contains cinterone ‘options for
creating query. 5
6 Double click the fields sta) Name, - The fields wil oppear in Fleld row of
uery design grid, :
7. Type >80 in Criterla row under Marks field,
8. Click Run in Results group on Query Tools D
fate eee
SL aR ans traaansa|
Bao » :
Mtoe J Sree,
ee one tee S Sate >|
asc} ns Soran
ret en <2 Reser TT TT Ciara 1
9: Writing a Query to Select all the Students with Grade A,
Click Create tob,
Click Query Design in Other ‘S10Up. The Show Table dialog box appears,
Click the table Physics_Result,
Click Add,
Click Close to close Show Table dialo,
1 Query
19 box. The table appears in the upper port o
Designer window, The bottom part displays design grid that contains different ‘options tor
creating query,
Seeene6. Double click the fields Std_ID, Std_Name, Marks and Grade. The fields will Appear in Fiel,
query design ots
7.. Type ‘A’ in Criterla row under Grade field.
8. Click Run in Results group on Query poe Beslan tab. The result will appear.