M 1 ICT Lesson 9
M 1 ICT Lesson 9
Ninth Lesson
Form and queries
Create a form
A new form can be created under the name "Enter Student Grades" using the Form
Wizard
Example: To create a form from the current table "Student Grades"
1-Click on the table name "Student Grades" in the Navigation Pane on the left of the
screen, and the data for the "Student Grades" table will appear on the right of the
screen.
2- Choose the Create tab.
3- Click Form.
2
3
The Access program creates the form, and through the form the data for each
student‟s record is displayed individually, as in the following figure:
1
1. The current window is called Layout view, where the data of the first record is
displayed.
2. Click on the "Next record" icon to display the data of the next record.
3. Click on the "Last record" icon to display the data of the last record.
4. Click on the "First record" icon to display the data of the first record.
4 2 3 1
Note that:
• The form is used to enter and modify data in the "Student Grades" table.
• All data entered through the form appears in the "Student Grades" table.
• Data can be entered through the data table or through the form.
• There are several other ways to create a form in an Access desktop database.
"Queries are tools used to obtain data from the database according to "specific
criteria or conditions",
Through the query, information can be obtained from the database based on the
data stored in the database.
2
Create a new query using the "Query Design"
method
Access provides many methods that allow you to create a query
Using the Query Design view, which is the method that we will discuss and is
appropriate for what is required to be created.
When using the Query Design method, you can have greater control over the
details of the query design.
1
2
The "Design View" window will appear, which is divided into two parts, the upper part
contains the data source table, and the lower part is the query design grid
Design grid
3
It shows the names of all students and the subjects grade only for each student.
In this query we will deal with the fields of the "Student Grades" table:
To do this, the field names are listed on the query design grid
- The query result appears in the form of a table, showing all student data.
4
Hide a field or fields from the query
result:
To hide one or more fields from the query result.
From the "View" menu, choose "Design View"
The query design window will appear.
Click on the ✓ sign in the check box in the Show row in the design grid below the
columns Science score.
The sign will be removed, which means hiding the field/fields in the query result.
Click on the Run icon in the Results group and the result will appear as follows:
5
How to add Criteria or Conditions in a Query:?
For example:
You are required to create a query to show only the data of the student Nada's record,
steps: -
Type the search criterion ="Nada "in the "Student Name" column in the Criteria
field.
We write the condition in the column of the field "Student Name", and in the row
Criteria.
Execute the query, the student record or records that meet the criterion or
condition are displayed.
6
Questions
Q1 : Put ( ) or ( X )
1. The form is a graphical interface designed to interact with data stored in the
database. ( ).
2. We use the form to enter, modify or delete this information in an organized and
convenient way. ( ).
3. A new form can be created under the name "Enter Student Grades" using the Form
Wizard. ( ).
4. All data entered through the form does not appear in the "Student Grades" table. ( ).
5. Data can be entered through the data table or through the form. ( ).
6. There are several other ways to create a form in an Access desktop database. ( ).
9. The Query Design window is divided into two parts; the upper part is the query design
grid. ( ).
10. The Query Design window is divided into two parts; the lower part is the data source
table. ( )
7
Ministry Evaluation ( Week 12 )
Homework
1. To design a costume graphical interface to interact with the data stored in the
database we use.............
A- Form B- Query
C- Tables D- Reports
2. To create a form student grade table in your database select ................from Create
tab.
A- Design B- Form
C- Blank. D- Query
Class Evaluation
Open MS Access application
Create a Form and use it to enter student’s marks to the data table.
Homework
1. To obtain data from database according to a specific condition, we use.............
A- Form B- Table
2. When using the .................... method, you can have greater control over the details
Class Evaluation
Open MS Access application