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.

  1. Concepts
  2. Questions
  3. Sort and link
  4. The numbers
  5. Scenarios
  6. 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 BY makes one row per client with the sum, and DESC puts the largest first. Without DESC, the order is reversed; without GROUP BY, one row per order; mixing SUM and 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.