ICSOC-8.16.4 Query Design and Multi-Criteria Filtering (M)

Easy

ICSOC-8.16.4.1 Query Creation Modes: Simple Query Wizard vs. Query Design View

Query Creation Modes: Simple Query Wizard vs. Query Design View

In Microsoft Access 2016, queries serve as fundamental analytical engines that retrieve, calculate, combine, and filter records from one or more underlying tables into a dynamic virtual dataset known as a dynaset. When initiating a query, users are provided two primary developmental pathways via the Create tab: the Simple Query Wizard and Query Design View. The Simple Query Wizard provides a guided, multi-step graphical workflow ideal for beginners and straightforward extractions. It enables users to select specific fields from multiple tables or queries, pick between detail queries (displaying every single record) or summary queries (automatically performing basic aggregations such as Sum, Avg, Min, or Max), and automatically establishes the underlying SQL SELECT structure without requiring technical query syntax.

While the Query Wizard simplifies rapid baseline query generation, Query Design View provides complete architectural freedom and precision engineering over data retrieval. Query Design View presents a two-pane visual environment comprising the Table/Object Relationship pane at the top and the Query Design Grid (QBE – Query by Example grid) at the bottom. In Design View, database designers can define complex multi-condition filtering criteria, specify multi-field sorting hierarchies, insert calculated expressions using the Expression Builder, configure parameter prompts, and construct table joins. Advanced users can also toggle seamlessly between Design View, Datasheet View (to examine live dynaset output), and SQL View (to directly view or edit the underlying structured query language statement).

Easy
Which feature in Microsoft Access provides a guided, step-by-step graphical dialog interface to generate basic select queries without requiring manual configuration of the Design Grid or SQL syntax?
Option B is correct because the Simple Query Wizard guides users through a multi-step sequence to select specific fields from tables or existing queries, choose between detail and summary formats, and build basic queries without manually placing fields on a grid or writing SQL code. Option A provides a full manual design environment with a grid. Option C analyzes table normalization, and Option D is not a standard guided query creation wizard.
Medium
What primary architectural advantage does Query Design View offer over the Simple Query Wizard when engineering complex data extraction routines?
Option B is correct because Query Design View gives database designers granular control over the Query by Example (QBE) grid and table schema pane, enabling multi-condition AND/OR criteria, join type customization (Inner, Left, Right), calculated expressions using Expression Builder, and multi-tiered sorting orders. Option A is incorrect because queries in Design View produce dynasets by default. Options C and D describe incorrect restrictions.
Tricky
While building a summary query in the Simple Query Wizard, a user selects the ‘Summary’ option for numeric sales fields. How does the wizard internally structure this aggregation compared to Design View?
Option A is correct because selecting ‘Summary’ in the Simple Query Wizard automatically configures summary calculations (Sum, Avg, Min, Max, Count), which Access compiles into a SQL statement containing GROUP BY and aggregate functions; this produces the identical functional result as toggling the ‘Totals’ (uppercase Sigma button) row in Query Design View. Option B is incorrect because queries never delete records during SELECT aggregations. Options C and D are completely incorrect.
Medium

ICSOC-8.16.4.2 Design Grid Anatomy: Field, Table, Sort, Show Checkbox, and Criteria Grid Dynamics

Design Grid Anatomy: Field, Table, Sort, Show Checkbox, and Criteria Grid Dynamics

The Query by Example (QBE) Design Grid in Microsoft Access functions as the operational command center where field projections, sorting sequences, display visibility, and evaluation rules are configured. The grid is organized into distinct functional rows: Field, Table, Sort, Show, Criteria, and multiple ‘or’ criteria rows. The ‘Field’ row designates the specific attribute or custom calculated expression being evaluated, while the ‘Table’ row explicitly identifies the parent entity or underlying query from which that attribute originates. The ‘Sort’ row enables the user to specify ascending or descending sorting orders across single or multiple fields. Crucially, Access evaluates sort precedence strictly from left to right across the grid; the leftmost sorted column serves as the primary sort key, with adjacent sorted columns functioning sequentially as secondary and tertiary sort tiers.

The ‘Show’ row features interactive checkboxes that dictate whether a given field will physically render in the resulting Datasheet View dynaset. Unchecking the ‘Show’ box is a vital architectural technique when a field is required strictly for filtering criteria or sorting logic (e.g., filtering out inactive accounts or sorting by employee hire date) but should remain hidden from the end-user’s final view. Below the Show row lies the ‘Criteria’ row, followed by sequential ‘or’ rows, which house expression statements, logical operators, and value filters that evaluate every candidate record. The meticulous configuration of these grid rows enables Access to dynamically compile visual grid parameters into optimized SQL statements during query execution.

Easy
In the Microsoft Access Query Design Grid, what is the specific operational purpose of the ‘Show’ row checkbox?
Option B is correct because the ‘Show’ row consists of checkboxes that determine column visibility in the dynaset; clearing the checkbox hides the column from the final datasheet display while still allowing the field to be used for sorting or filtering criteria. Option A refers to database encryption. Option C relates to table design properties. Option D is incorrect because unchecking ‘Show’ does not delete the field from the underlying table.
Medium
A database designer configures sorting in Query Design View: ‘Department’ is set to Ascending, and ‘Salary’ is set to Descending. How does Microsoft Access determine which field takes sorting precedence?
Option B is correct because Access resolves multi-field sort hierarchies strictly based on column position from left to right in the Design Grid; the leftmost sorted field serves as the primary sort key, and each subsequent sorted field to the right acts as secondary, tertiary, etc. Options A, C, and D describe invalid rules that do not exist in Access query evaluation.
Tricky
A query must filter employee records to only show individuals hired before 2020, but company security policy prohibits displaying the ‘HireDate’ column to end users. How should the query grid be configured?
Option A is correct because the QBE grid permits fields to participate fully in criteria filtering while keeping their display suppressed in the output dynaset by unchecking the ‘Show’ checkbox; the underlying SQL query includes the field in the WHERE clause but omits it from the SELECT column list. Option B destroys schema data. Option C is false. Option D deletes or corrupts data/layout rather than configuring query projection cleanly.
Medium

ICSOC-8.16.4.3 Comparison Operators in Criteria: Equality, Relational Evaluation, and Boundary Logic

Comparison Operators in Criteria: Equality, Relational Evaluation, and Boundary Logic

In Microsoft Access queries, comparison operators form the mathematical and relational foundation for filtering records within the Design Grid’s Criteria row. Comparison operators evaluate field values against explicit target thresholds, producing a boolean result (True, False, or Null) for each record. The six fundamental comparison operators in Access are: equal to (=), not equal to (<>), less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=). If a user enters a raw value into the Criteria row without an operator (such as typing ‘CA’ or 500), Access automatically defaults to the equality operator (=). The inequality operator (<>) selectively extracts all records that deviate from the specified argument, functioning as an exclusion filter.

Relational comparison operators operate across diverse Access data types, following strict formatting and ordering conventions governed by the Jet/ACE database engine. When evaluating numeric types (such as Currency, Long Integer, or Double), operators perform standard mathematical magnitude comparisons (e.g., > 1000). For Date/Time data types, Access automatically encapsulates date literals within hash symbols (#) (e.g., >= #01/01/2024#), where ‘less than’ denotes chronologically earlier dates and ‘greater than’ represents later dates. When applied to Short Text or Long Text fields, comparison operators perform alphabetical collation based on standard ASCII/Unicode sort orders (e.g., < "M" returns all text values beginning with letters from A through L), requiring textual literals to be delimited within double quotation marks.

Easy
Which comparison operator is used in Microsoft Access query criteria to select all records except those that match a specific specified value (inequality)?
Option C is correct because Microsoft Access and standard SQL utilize ‘<>‘ as the comparison operator for ‘not equal to’. Option A (‘==’) and Option B (‘!=’) are syntax used in programming languages like C++/JavaScript/Python rather than standard Jet/ACE SQL criteria. Option D is invalid syntax in Access.
Medium
When entering criteria for a Date/Time field in Access Query Design View (such as selecting orders placed on or after March 15, 2024), what delimiter does Access automatically place around the date literal?
Option A is correct because Microsoft Access automatically encapsulates Date/Time literals in hash/pound signs (#), such as >= #03/15/2024#, distinguishing date literals from numeric division expressions or text strings. Option B is used in some specialized database dialects. Option C is used for text in standard SQL, and Option D is used for wildcard matching in ANSI SQL.
Tricky
In a Short Text field named ‘ProductCode’, an administrator enters the criterion < "D" in the Design Grid. Which of the following set of values will be returned?
Option B is correct because relational comparison operators (<, <=, >, >=) applied to text fields perform alphabetical/lexicographical comparisons based on character collation sequences; ‘< "D"' evaluates to all string values that alphabetically sort strictly prior to the character 'D' (e.g., 'Apple', 'Cable', 'C999'), excluding 'Delta', 'Dog', or any string starting with 'D' or later letters. Option A confuses magnitude comparison with string length. Options C and D describe incorrect operations.
Tricky

ICSOC-8.16.4.4 Logical Operator Criteria: AND Evaluation vs. Multi-Row OR Logic in Query Grids

Logical Operator Criteria: AND Evaluation vs. Multi-Row OR Logic in Query Grids

In Microsoft Access query design, multi-criteria filtering hinges upon the precise spatial placement of conditions across the Design Grid to enforce Boolean logic. The fundamental architectural rule dictates that criteria placed on the same horizontal row are evaluated using logical AND, whereas criteria placed across separate horizontal rows are evaluated using logical OR. When criteria across multiple fields occupy the same ‘Criteria’ row (e.g., Department = “Sales” AND Salary > 50000), a candidate tuple must satisfy every single condition simultaneously to qualify for inclusion in the output dynaset. Similarly, multiple criteria entered within a single cell separated by the ‘And’ operator (such as >= 1000 And <= 5000) also assert conjunctive logical AND conditions.

Conversely, entering criteria on separate horizontal rows invokes logical disjunction (OR). If a criterion is entered in the ‘Criteria’ row for one field (e.g., City = “New York”) and another criterion is entered on the immediately succeeding ‘or’ row for another field (e.g., Department = “Finance”), Access evaluates each row independently. A record is retrieved if it fulfills the criteria of row 1 OR the criteria of row 2. Complex compound Boolean expressions—such as (Department = “Sales” AND Region = “North”) OR (Department = “Marketing” AND Region = “South”)—are visually constructed by creating distinct combinations on consecutive grid rows. Misplacing criteria across rows fundamentally alters query semantics, making row discipline essential for data retrieval integrity.

Easy
In Microsoft Access Query Design View, how does the database engine evaluate criteria when conditions for two different fields are placed on the exact same horizontal ‘Criteria’ row?
Option B is correct because conditions placed on the same horizontal row across different fields are conjoined by logical AND; for a record to appear in the query output, it must satisfy all conditions on that row simultaneously. Option A describes conditions placed on separate rows (OR logic). Options C and D are completely incorrect.
Medium
An administrator creates a query where ‘Country’ = “Canada” is entered on the first Criteria row, and ‘Sales’ > 10000 is entered on the second (‘or’) row with the Country column left blank on that second row. What records will this query retrieve?
Option B is correct because placing criteria on separate rows establishes logical OR disjunction: the first row evaluates (Country = “Canada”), and the second row evaluates (Sales > 10000) for all records without restricting the Country field. Thus, the query extracts all Canadian records plus any global records where Sales exceed 10000. Option A describes AND logic on the same row. Option C is false because blank grid cells simply impose no filter for that field on that row. Option D misinterprets the OR condition.
Tricky
A query must implement the compound logic: (Category = “Electronics” AND Quantity < 5) OR (Category = "Furniture" AND Quantity < 2). How must this be structured in the Access Query Design Grid?
Option B is correct because Access resolves each horizontal row as an independent AND conjunction and combines separate rows via an OR disjunction; placing (“Electronics”, < 5) on row 1 creates (Category = "Electronics" AND Quantity < 5), and placing ("Furniture", < 2) on row 2 creates (Category = "Furniture" AND Quantity < 2), yielding the exact compound Boolean logic. Option A, C, and D generate syntactically incorrect or semantically flawed queries that fail to evaluate the paired conditions.
Medium

ICSOC-8.16.4.5 Wildcard Criteria Expressions: Pattern Matching with Asterisk, Question Mark, and Character Sets

Wildcard Criteria Expressions: Pattern Matching with Asterisk, Question Mark, and Character Sets

Wildcard characters in Microsoft Access provide powerful pattern-matching capabilities, enabling queries to search for text patterns when exact strings are unknown, variable, or partially defined. In standard Access databases running under the default ANSI-89 (Jet/ACE) SQL syntax, the primary wildcard operators are the asterisk (*), the question mark (?), the number sign (#), and bracketed character lists ([charlist]). The asterisk (*) represents any sequence of zero, one, or more characters; for example, entering Like “Sm*” matches “Smith”, “Small”, or “Sm”. When placed at both ends (e.g., Like “*tech*”), it acts as a substring locator, retrieving any record containing the token “tech” anywhere within the text string.

In contrast, the question mark (?) serves as a single-character placeholder, matching exactly one alphabetic or alphanumeric character at a precise position. For instance, the expression Like “B?ll” retrieves “Ball”, “Bell”, and “Bill”, but rejects “Bullseye”. The number sign (#) matches any single numeric digit (0-9). Access also supports character ranges within brackets, such as Like “[A-C]*” to match strings commencing with A, B, or C, and the exclamation mark negation operator Like “[!A]*” to exclude strings starting with A. In the Query Design Grid, typing a wildcard expression without the ‘Like’ operator causes Access to automatically prepend ‘Like’ and enclose the string in double quotes upon focus departure.

Easy
In Microsoft Access ANSI-89 query criteria, which wildcard character matches any sequence of zero, one, or multiple characters?
Option B is correct because under standard Access ANSI-89 syntax, the asterisk (*) represents any string of zero or more characters (e.g., Like “Comp*” matches Computer, Computing, or Comp). Option A (?) matches exactly one character. Option C (!) is used for negation inside brackets. Option D (%) is the multiple-character wildcard in ANSI-92 SQL mode, but (*) is the standard Access wildcard.
Medium
A user enters the criterion Like “T?m” in the ‘FirstName’ field of an Access query. Which list of names will be returned?
Option A is correct because the question mark (?) matches exactly one single character at that exact position; therefore, “T?m” matches any three-letter word beginning with ‘T’ and ending with ‘m’, such as “Tim”, “Tom”, or “Tam”. Option B and Option C contain strings with multiple characters between ‘T’ and ‘m’ (or longer total lengths), which require the asterisk (*) wildcard instead. Option D contains strings that do not match the exact three-character requirement.
Tricky
An inventory auditor needs to locate all product codes that begin with either ‘A’, ‘B’, or ‘C’, followed immediately by any two single digits, and ending with any arbitrary suffix. What is the precise Access wildcard criterion?
Option A is correct because in Access ANSI-89 wildcard syntax: ‘[A-C]’ specifies a character list matching ‘A’, ‘B’, or ‘C’; ‘#’ matches any single numeric digit (so ‘##’ matches exactly two digits); and ‘*’ matches any remaining characters of any length, fulfilling all pattern criteria. Option B mixes ANSI-92 syntax and invalid parenthesis grouping. Option C lacks bracket notation and digit matching. Option D uses range evaluation which may include undesired intermediate text patterns.
Tricky

ICSOC-8.16.4.6 Keyword Filtering Expressions: Between, In, and Null Value Evaluation Architecture

Keyword Filtering Expressions: Between, In, and Null Value Evaluation Architecture

Keyword filtering expressions in Microsoft Access provide concise, highly readable, and mathematically rigorous syntax for evaluating ranges, set memberships, and missing data within the Query Design Grid. The ‘Between … And …’ operator defines an inclusive numeric, chronological, or alphabetical interval, retrieving all values greater than or equal to the lower bound and less than or equal to the upper bound (e.g., Between 100 And 500, or Between #01/01/2023# And #12/31/2023#). It is equivalent to evaluating (Field >= LowerBound AND Field <= UpperBound). Negation is achieved via 'Not Between ... And ...', which filters out all values falling within the closed boundary interval.

The ‘In (…)’ operator facilitates discrete set membership filtering by matching a field against a comma-delimited list of literal values, such as In (“Draft”, “Pending”, “Approved”). This constructs an optimized shorthand for multiple disjunctive OR conditions (Status = “Draft” OR Status = “Pending” OR Status = “Approved”). Crucially, relational databases treat missing, unrecorded, or unknown data as NULL, which represents the complete absence of a value rather than an empty string (“”) or numeric zero (0). Because NULL cannot be evaluated using standard equality comparison operators (e.g., = Null always evaluates to unknown/Null, returning zero rows), Access provides the specialized unary operators ‘Is Null’ (to locate empty records) and ‘Is Not Null’ (to isolate populated records).

Easy
Which keyword expression in Microsoft Access is used to retrieve all records that contain no value (blank/unrecorded) in a specific field?
Option C is correct because relational databases define missing or unassigned values as NULL, and Access requires the unary operator ‘Is Null’ to evaluate and filter for them. Option A tests for the numeric value zero. Option B tests for a zero-length text string (“”), which is distinct from a NULL value. Option D is VBA function syntax rather than an Access query criteria keyword.
Medium
In a sales query, the criterion Between 100 And 500 is applied to the ‘UnitCost’ field. How does Microsoft Access treat the boundary values 100 and 500?
Option A is correct because the ‘Between … And …’ operator in Microsoft Access and SQL is inherently inclusive of both endpoints; it is logically identical to evaluating (UnitCost >= 100 AND UnitCost <= 500). Options B, C, and D describe half-open or fully open exclusive intervals, which do not reflect the operation of 'Between ... And ...'.
Tricky
A developer attempts to find all records where the ‘PostalCode’ field has not been entered by typing = Null in the Criteria row. Why does this query return zero records even when unpopulated rows exist?
Option A is correct because SQL and the Jet/ACE engine implement ANSI three-valued logic (True, False, Unknown/Null); since NULL represents an unknown missing value, two NULLs are never considered equal, meaning ‘= Null’ always evaluates to Unknown, causing the WHERE filter to reject all records. The proper syntax is ‘Is Null’. Option B is false. Option C and Option D describe nonexistent behaviors.