Download - Microsoft Access Manual 1
![Page 1: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/1.jpg)
Microsoft Access Manual 1
ByDhawala Kovuri
Elham S.KhorasaniIsmail Guneydas
![Page 2: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/2.jpg)
Creating a Blank Database
1. Open up Microsoft Access2. Click on Blank document button3. On the right panel, Specify the location
for saving your database and click on create.
![Page 3: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/3.jpg)
![Page 4: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/4.jpg)
Creating Table
• When creating a blank database, by default a blank table will be created .You can rename this table by simply right-click on the table name and choose rename.
• For creating a new table, click on the create tab and on the ribbon choose table
• The left panel is called the navigation bar and shows all the tables that have been created for this database.
![Page 5: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/5.jpg)
![Page 6: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/6.jpg)
Modifying Table
• There are two different views used for modifying tables:1. Datasheet view: used for inserting data to the
table2. Design view: used for modifying the table
structure(fields)
![Page 7: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/7.jpg)
![Page 8: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/8.jpg)
Design view
• Design view is where you can define your table fields and their data types.
• Before switching to the design view, the table must be given a name.
• By default an “ID” field is generated for each table. This field is a unique identifier of each record. It is referred to as the Primary Key Field. It is automatically incremented when a new record is added to the table.
![Page 9: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/9.jpg)
![Page 10: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/10.jpg)
Primary Key• A field, or a collection of fields, in a table is designated as
the primary key.
The primary key uniquely identifies a record in the table.
Example: SSN is unique for each person, therefore it can serve as a primary key for the “person” table.
To set a field as a primary key, right click on the field name and choose the primary key option.
To set more that one filed as a primary key, first select all the fields, then right click and choose primary key option.
![Page 11: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/11.jpg)
![Page 12: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/12.jpg)
Field properties
• Each field has some propertiesthat can be changed. Some of these properties are:Field Name: Field Type:Field Size: Specifies the max size of the field. For example
“first name” is not usually bigger than 50 charactersCaption: specify the label for the field when used on the
form, by default caption is the field nameDefault value: a value that automatically entered in this
field for new records
![Page 13: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/13.jpg)
Example (Client Table)• As an example, let’s create a new table to
store client’s information and name it “client”. • Each client, has these attributes: SSN,
firstname, lastname, phone, address, yearsOfFirm
• SSN is the primary key for this table.• Firstname is not usually more than 40
characters, so the field size of firstname is specified as 40.
![Page 14: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/14.jpg)
![Page 15: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/15.jpg)
Datasheet view
• Datasheet view is usually used for inserting/deleting/modifying records in the table.
• Remember the data that you enter for each field must match the data-type and attributes of the field, for example in the person table, we specified the data type of the phone field as a number, now if I try to insert something like 453-6025 in phone field, access gives an error. Therefore the data type of the phone field should have text rather than number.
![Page 16: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/16.jpg)
![Page 17: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/17.jpg)
Adding/deleting Records
• For adding a new record after a row, select the entire row, right click and choose new record option.
• For deleting an existing row, select the entire row, right click and choose delete row option
![Page 18: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/18.jpg)
![Page 19: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/19.jpg)
Sort records
• For sorting records by a specific field, right click on the column and choose “sort” option.
• For example, sorting the records by their firstname in the person table
![Page 20: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/20.jpg)
![Page 21: Microsoft Access Manual 1](https://reader036.vdocuments.us/reader036/viewer/2022062305/56815aac550346895dc84b98/html5/thumbnails/21.jpg)
In-lab Exercise 2
As an exercise create a student table with the following fields: StudentID :Number, Primary key Name: text, fieldsize:50 Nationality: text ,fieldsize:10 Graduate: Yes/No Tuition: Currency Major: text, fieldsize:15
Insert some record to the table and sort the table by “name” field.
Submit your file to the blackboard under lab-exercise2 link.