GoalExplain what a form is and how it shows one record at a time.
New words
form · a screen that shows the data of one record at a time, with a box for each fieldnavigation buttons · buttons that move to the first, previous, next or last recordnew record · an empty record where we type the data of one more thingdata entry · typing data into the boxes of a form or table
Explanation
A table shows many records at once, so it can look crowded. A form is easier to read and to fill in: it shows one record at a time, with a box for each field. Think of a form as a paper card for one pupil. At the bottom of a form there are navigation buttons: first, previous, next and last. They move from one record to another. There is also a button for a new record, which shows an empty form. When you type data in the boxes of a form, it goes into the table behind it, so the table and the form always show the same data. A form does not keep the data itself: the table does. Programs differ in how forms look, but the idea is the same. Here is a form for our invented pupils.
Form: Pupils
id
2
Name
Salma
Class
1B
English
17
Buttons
first | previous | next | last
Worked examples
A
B
C
D
1
id
Name
Class
English
2
1
Mina
1A
15
3
2
Salma
1B
17
4
3
Omar
1A
12
5
4
Nour
1C
19
6
5
Youssef
1B
14
You are looking at the form of Salma (id 2). Press “next” once. The form now shows id 3, Omar, class 1A, English 12. Press “next” twice more and you reach id 5, Youssef.
new record→type in the boxes→a new row in the table
A new pupil, Hana, joins class 1C. We press “new record”, type the name, class and mark in the boxes, and the table gets a sixth row. The table has 5 records before and 6 after.
form→table
We type Omar’s mark as 13 instead of 12 in his form. Open the table: the cell for Omar now says 13. The form and the table are two views of the same data.
Class activity
Fold a sheet of paper into six cards. On each card write the fields id, name, class and favourite subject for an invented classmate. Stack the cards: moving through them is “next” and “previous”. Then make one more card, which is a “new record”.
Practice
1
How many records does a form show at one time?
One.
2
Which button takes you to the record after the one you see?
Next.
3
Where does the data typed in a form go?
Into the table behind it.
4
The table has 5 records and we add one with a form. How many records now?