Skip to main content
Engineering LibreTexts

4.1: Microsoft Access Queries

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Queries are used for multiple purposes in a database environment. They can be used directly to

    • restrict the information a user can see,
    • as the basis of a MS Access form,
    • as the basis of a MS Access report.

    We shall use the Library database for examples. With MS Access you can create a query in multiple ways; we will examine the use of the Query Designer. To create a query, click the Create tab and then click the Query Design icon:

    Create a query.
    Figure \(\PageIndex{1}\): Create a query.

    As a result MS Access opens a Query By Example (QBE) window that you use to specify components of a query:

    QBE window.
    Figure \(\PageIndex{2}\): QBE window.

    This window comprises two areas: Relationships and Grid. The Relationships area will show each table that needs to be accessed and the relationships to be used with those tables.

    The Grid area is used to specify:

    • fields and tables,
    • sort fields,
    • fields to be included in the results display,
    • criteria fields must meet for a row to be included in the query result,
    • calculations,
    • grouping of rows for displaying summary information

    We will use the Library database; we will start with simple examples and work our way to more complex situations.

    This page titled 4.1: Microsoft Access Queries is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Ron McFadyen.

    • Was this article helpful?