Forms and reports
The data entry form bound to a table (controls, list fed by a foreign key, subform, validation) and the printable report (headers, detail, groupings, subtotals, footers).
- 26 cards
- 6 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- Scenarios
- Understand
A few cards from the deck
Form: what is it?
Show the answer
An entry screen bound to a table or a query, whose every field writes into a column of the database.
It guides entry (lists, boxes, dates) and avoids mistakes, but it does not replace the database's constraints.
A report must give revenue per client, from highest to lowest. Which query feeds it?
- SELECT id_client, SUM(montant) AS ca FROM commande GROUP BY id_client ORDER BY ca DESC
- SELECT id_client, SUM(montant) AS ca FROM commande GROUP BY id_client ORDER BY ca ASC, id_client
- SELECT id_client, montant FROM commande ORDER BY montant DESC
- SELECT id_client, SUM(montant) AS ca FROM commande ORDER BY ca DESC
Show the answer
SELECT id_client, SUM(montant) AS ca FROM commande GROUP BY id_client ORDER BY ca DESC
GROUP BYmakes one row per client with the sum, andDESCputs the largest first. WithoutDESC, the order is reversed; withoutGROUP BY, one row per order; mixingSUMand a plain column with no grouping is refused in standard SQL.For an id_client column, a foreign key, the form offers a list fed by the … table.
Show the answer
For an id_client column, a foreign key, the form offers a list fed by the client table.
An existing client is picked instead of retyping their name: no more typos, and the foreign key is always valid.
Bound control: what is it?
Show the answer
A form element (text box, list, checkbox) tied to a column: what is typed in it is saved into that column.
The column's type guides the choice of control: boolean as a checkbox, date as a date picker, foreign key as a list.