Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.
Ans: Tables are the main units of data storage in Access. Recall that a table is made up of one or more
columns (or fields) and that a given column may appear in more than one table in order to indicate a
relationship between the tables.
There are a number of ways to create a table in Access. Access provides wizards that guide the user through
creating a table by suggesting names for tables and columns. The other main way to create a table is by
using the Design View to manually define the columns (fields) and their data types.
Steps to create Student Table:
1.
2.
When Microsoft Access first starts up, a dialog box is automatically displayed with options to create a
new database or open an existing one.
If this dialog box is displayed, click Access Database Wizards, pages, and projects and then click OK.
If you have already opened a database or closed the dialog box that displays when Microsoft Access starts
up, click New Database on the toolbar.
3. Then you give a name to the new database, and click on Create.
4. After clicking the database objects window will be displayed on the screen.
5. In the above picture you select table, we can create database by using three methods, they are Create
table by Design view, Create table by using wizard and Create table by entering data.
6. So you press on Create table by using wizard.
7. Then the table wizard will be displayed on the screen.
8. In the above picture has tow options one is Business and second one is personal.
You select any one of the option. Than you select a category which you want.
Eg: SNo, StuName, Address, Marks1, Marks2, Marks3, Marks4 and Marks5.
You select some fields and rename it as in the following picture.
9.Than you press next button, it will show in the following window.
10. In the above picture asking name for your table , give a name in the place of Oders as Student. Next you
press Next button.
11. After next window will show three options like:
You select Modify the table desing., then you press Finish button.
12. Then you select the data type to enter data.
13. Then you save it. After your enter student data into database, as in the following picture.
7. After display in the above window you select employee table name at the place of Choose the table
or query where the objects data comes from and click on Ok button.
8. Now Form1 design view will be displayed as in the following picture.
9. Then you drag the fields and set as in the following fields.
Another Model:
1. When you create table after it will show in the following picture.
4. You click on Create form in design view, than you will get grid line design view with Tool
box.
5. Then you design in the following picture.
6. After completion of design view than you click on view icon then it will show in the following
picture.
10
11
12
13
10.
click on Query, then the new query will be displayed on
the screen. Next you select design view.
11.
After you set the require fields into sorting order.
14
15
16
7. First you select your table in the place of Tables/ Queries , than you move the
fields from available to selected fields.
8. Then you press next button.
9. Next you press Next button it will show grouping window than you press again
next button.
10.
After the report wizard asking sorting order, then you press Next button.
11.
Next the report wizard asking layout models, it has three types they are
Columnar, Tabular and Justified. You select tabular layout.Then press Next
button.
12.
Then the report wizard asking style, you select any one of the style and
press next button.
17
13.
Finally you press Finish button you will get report as in the following
picture.
18
In this window we are asked to introduce the fields to include in the form.
Firstly we select from the Table/Queries box the table or query that we are going to get the data from, this
will be the form source. If we want to extract data from various tables it would be better to first create a
query to obtain this data and then select this query as the form source.
Next we will select the fields to include in the form by clicking on the field and then the
simply double click on the field.
button or
19
button and the field will be removed from ther selected fields
We can select all the fields at the same time by clicking on the
using the button
.
Next we click on the Next> button and the window seen in the following example will appear...
In this screen we select the data distribution within the form. By selecting a format it will appear on the left
side the way it will be seen in the form.
Once we have selected the distribution of our choice click Next and the following window will appear:
20
In this screen we select the forms style, we can select between the various defined styles that Access has. By
selecting a style it will appear on the left side as it will in the form.
Once we have selected a style of our choice we click on the Next button and the last screen of the forms
wizard will appear.
In this window we are asked for the title of the form, this title will also be the name assigned to the form.
Before clicking on the Finish button we can choose between:
After you click on Finish Button , you will get in the following form window.
21
22
6. Next you move the fields available fields into selected fields , then
you press Next Button.
7. Again press Next button it will show in the following screen
23
In the above picture has two options Open the query to view
information and modify the query design.
If you want to modify the query you must select Modify the query
desing
Than press Finish button.
8. Now the custom query window will be displayed for modify your
query.
24
Ans: A database normally consists of more than one table. In odder to link
some fields in one table to another field in other tables. First we have to provide
relationships between the tables. Here relationships means providing links
between two or more pages.
In order to provide the link between tables, there must be a common field in
both the tables.
We have already created a table. Now let us create another table and provide
relationship between the two tables.
Let us crate the following three tables now.
1. Producer
2. Supplier
3. Customer
Now we have three tables in database.
25
Select tables 1 , 2 and 3 click on Add consequently, the table goes into
relationship screen.
3. In order to provide relationships, we should link the common field like
ProductID. Click an ProductID field in table 1 and again click on
ProductID 2 and 3.
4. Consequently the following screen appears.
5. Drag the mouse starting from the common field to second and third.
The folloing screen appears.
26
27
Now you can see the results of the query in a dynaset. The results show the average
total marks of students in each student.
28
n the next page is a list of the fields and their attributes. Create the fields then save the table
as supplier.
Properties
Data
Type
Field
Size
SupName
Text
30
SupAddress
Text
SupCellNum
Number
Caption
Indexed?
Default
Value
Required
Primary
Key
Yes (No
Duplicates) *
Yes
No
100
No
Yes
No
Long
Integer
Yes
No
No
SupEmail
Text
30
No
No
* This will be set automatically when you define the field as the primary key
No
29