Professional Documents
Culture Documents
Click the
arrow to
continue
0
1.1
2.1
5.1 Back
Return to the
previous slide.
Forward
Move to
Home
the next
Return to the
slide.
beginning of
the module
0
Section 0
Objectives & Overview
0
You will not learn how to create a new query or filter in this
module as we already learned that during class.
This module will help you learn a process for selecting the
correct criterion to use in various types of field data types. It will
also train you to avoid common mistakes made when using
criteria within queries and filters.
1.1
Goal 1
Differentiate between Select, Append,
Delete, and Update queries.
1.1
SELECT QUERY
• A select query answers questions Select Append
about specific data.
Types of
• You can use 1 or more tables to Access
create a select query. Queries
Delete Update
0
1.1
Delete Update
0
1.1
APPEND QUERY
• An append query moves records from Select Append
one or more data sources (such as
another table) and copies the Types of
selected records to an existing table. Access
Queries
Delete Update
0
1.1
1.1
DELETE QUERY
• A delete query deletes records that
Select Append
satisfy a criterion.
Types of
Access
Queries
Delete Update
0
1.1
1.1
UPDATE QUERY
• An update query changes records in Select Append
a table according to the criterion
provided. Types of
Access
Queries
Delete Update
0
1.1
1.1
A. Append C. Select
1.1
Incorrect.
1.1
Correct!
1.1
A. Append C. Select
1.1
Incorrect.
1.1
Correct!
1.1
1.1
1.1
• Note the fields that are included and how the data within each field
is formatted. These will be things to keep in your mind as you think
through the examples later to determine criteria for queries and
filters.
0
1.1
2.1
Goal 2
Determine text for criteria in short
text and memo fields.
Objective 2.1—Given a scenario, choose the correct
criterion to use within a text field.
0
1.1
2.1
• Once your query has been setup in Design View, it is time to
determine the criteria or single criterion needed to answer the
question about your data.
• Determining a criterion for a query requires some problem-solving
skills.
• You must think about the question you are attempting to answer in
the query or filter.
0
1.1
2.1
1.1
2.1
Example 1: Searching for a matching value
You are looking at a table containing information about students at
Longview. Which students live in Grandview?
1.1
2.1
Example 1: Searching for a matching value
Which students live in Grandview?
Remember that
the city field shows
which city
students live in.
0
1.1
2.1
Example 1: Searching for a matching value
Which students live in Grandview?
1.1
2.1
Example 1: Searching for a matching value
Which students live in Grandview?
City names are typed as text. We can type the exact city name we are looking for as
our criterion. No need for symbols or other words in the criterion.
0
1.1
2.1
Example 1: Searching for a matching value
Which students live in Grandview? Criterion is under
Here’s what our criterion would look like: the city field in the
design grid.
Criterion is in the
row labeled
“Criteria:”.
1.1
2.1
Example 2: Searching for a matching value
You are looking at the same table containing
information about students at Longview.
Which students live in Blue Springs or Lee’s Summit?
1.1
2.1
Example 2: Searching for a matching value
Which students live in Blue Springs or Lee’s Summit?
Remember that
1. Which field(s) will I the city field shows
look in to find the which city
answer to my students live in.
question?
We are looking for all
students who live in
Blue Springs OR Lee’s
Summit.
We need an OR query.
We will use more than
one row for our criteria.
0
1.1
2.1
Example 2: Searching for a matching value
Which students live in Blue Springs or Lee’s Summit?
1.1
2.1
Example 2: Searching for a matching value
Which students live in Blue Springs or Lee’s Summit?
We can simply type the exact name of the cities we are looking for.
We will type in 2 city names: Blue Springs and Lee’s Summit.
These two city names will go on two separate rows in the design grid.
0
1.1
2.1
Example 2: Searching for a matching value
Which students live in Blue Springs or Lee’s Summit?
Criteria is under
Here’s what our criterion would look like: the city field in the
design grid.
Criteria is in two
different rows.
This is an
example of
an OR query.
0
1.1
2.1
You would like to see all students who have the last name Smith.
Which field should this criterion be typed under?
1.1
2.1
Incorrect.
1.1
2.1
Correct!
1.1
2.1
Look at the table data provided below.
Which of the following would be the correct criterion to use for a query
searching for students who live in the state of Missouri?
A. Missouri B. MO
1.1
2.1
Incorrect.
1.1
2.1
Correct!
1.1
2.1
You are using a query to find students who live in the city of Lone Jack.
Which of the query design grids below show the correct set up to
answer your question in Access?
Click the
image
containing the
correct answer.
0
1.1
2.1
Incorrect.
1.1
2.1
Correct!
1.1
2.1
You would like to use an advanced filter to find students who live in
Kansas City or Belton. Which of the filter designs below show the
correct set up to answer your question in Access?
Click the
image
containing the
correct answer.
0
1.1
2.1
Incorrect.
1.1
2.1
Correct!
1.1
2.1
Goal 2
2.2
1.1
2.1
2.2
1.1
2.1
Example 1: Criterion placed under an incorrect field
2.2
A student is looking for Longview students who live in the city of Lone
Jack. Look at the design grid below:
1.1
2.1
Example 1: Criterion placed under an incorrect field
2.2
1.1
2.1
Example 1: Criterion placed under an incorrect field
2.2
1.1
2.1
Example 2: Criterion has a typo
2.2
A student is searching for Longview students who live in the city of
Harrisonville. Look at the design grid below:
1.1
2.1
Example 2: Criterion has a typo
2.2
Did you spot the mistake?
1.1
2.1
Example 3: Using text not currently in the table
2.2
A student is searching for Longview students living in the city of Kansas
City. Look at the design grid below:
1.1
2.1
Example 3: Using text not currently in the table
2.2
1.1
You have asked the following question: Which patients live in Blue Springs or Lee’s
2.1 Summit? You created the query design grid below:
2.2
You have attempted to run this query, but you are not getting any results. From the
choices below, identify the mistake within the query criteria.
A. One or both criteria contain a typo.
1.1
2.1
2.2
Incorrect.
1.1
2.1
2.2
Incorrect.
1.1
2.1
2.2
Incorrect.
This is an OR query.
0
1.1
2.1
2.2
Correct!
1.1
You have asked the following question: Which customers have health insurance
2.1
through Humana and live in Belton?
2.2
You have attempted to run the query, but your results look incomplete. From the
choices below, identify the mistake within the query criteria.
C. The criteria should not be on the same row since this is an OR query.
Click the shape
containing the D. The criteria should not have the quote (“) characters around them.
correct answer.
0
1.1
2.1
2.2
Incorrect.
1.1
2.1
2.2
Incorrect.
1.1
2.1
2.2
Incorrect.
1.1
2.1
2.2
Correct!
1.1
2.1
2.2
Goal 3
3.1
Use numbers and comparison operators
as criteria in number, currency, and
AutoNumber fields.
1.1
2.1
Access prefers symbols within criteria.
2.2
3.1
1.1
2.1
Here are the operators needed when using criteria within number,
2.2 currency, and AutoNumber fields:
3.1
Operator Meaning Example
>2020
> Greater than Students graduating in all years greater than 2020
(2021, 2022, etc.).
1.1
2.1
2.2
3.1
Operator Meaning Example
>2020
> Greater than Students graduating in all years greater than 2020
(2021, 2022, etc.).
1.1
2.1
2.2
Which of the following operators would be used to indicate “less than or
equal to” in an Access query or filter?
3.1
A. >=
B. <=
Click the shape
containing the
C. “less than or equal to” correct answer.
0
1.1
2.1
2.2
3.1
Incorrect.
Try again.
Think about which operator is needed.
0
1.1
2.1
2.2
3.1
Correct!
1.1
2.1
You are looking for patients who currently have an outstanding balance
2.2
of at least $100. Which of the following operators would you choose to
3.1 complete this search?
A. < B. <=
1.1
2.1
2.2
3.1
Incorrect.
Try again.
Think about which operator is needed.
0
1.1
2.1
2.2
3.1
Correct!
1.1
2.1
Goal 3
2.2
3.1
3.2
Use numbers and comparison
operators as criteria in fields.
Objective 3.2—Given a scenario, use the correct
operator within a criterion.
0
1.1
2.1
Example 1: Searching for a specific number
2.2
You are looking at the table containing Longview students. You would
3.1 like to know which students graduate in the year 2020.
3.2
If our design grid is setup with the following fields, how can we use a
criterion to obtain the results we are looking for?
0
1.1
2.1
2.2
Keep in mind the following three questions as you work through the
3.1
examples in this section.
3.2
3.1
3.2
1.1
2.1
Example 2: Criterion containing operators
2.2
You are looking at the table containing Longview students. You would
3.1 like to know which students graduate after the year 2021.
3.2
You would like to use the filter by form shown below:
What should the criterion be to find the students you are looking for?
0
3.1
3.2
1.1
2.1
Example 2: Criterion containing operators
2.2
3.1
Here’s what our design grid should look like:
3.2
1.1
2.1
Example 3: Criterion containing operators in an AND query
2.2
3.1
You are searching for Longview students graduating in the year 2022
or after AND who live in the city of Lee’s Summit.
3.2
1.1
2.1
Example 3: Criterion containing operators in an AND query
2.2
We have 2 criteria. One
3.1 would go under the city
field and another under
3.2
the grad year field.
1.1
2.1
Example 3: Criterion containing operators in an AND query
2.2
3.1
For an AND query, we use
3.2 2 criteria in the same row.
1.1
2.1
Example 4: Criterion containing operators in an OR query
2.2
3.1
Let’s take the same example as before, but change the scenario a bit.
3.2 You are searching for Longview students graduating in the year 2022
or after OR all students who live in the city of Lee’s Summit.
1.1
2.1
Example 4: Criterion containing operators in an OR query
2.2
We have 2 criteria. One
3.1 would go under the city
3.2
field and another under
the grad year field.
1.1
2.1
Example 4: Criterion containing operators in an OR query
2.2
Notice the criteria
3.1 typed is the same
3.2 as the previous
example.
1.1
2.1
2.2 You would like to see all students who are seeking the degree program
3.1
“Associate in Computer Science” and all students who graduate in the
year 2022. Which type of query is needed?
3.2
A. AND B. OR
1.1
2.1
2.2
3.1
3.2
Incorrect.
1.1
2.1
2.2
3.1
3.2
Correct!
1.1
2.1
You would like to see all students who have a student number larger
2.2
than 1001025 in a Filter by Form. Which of the filter by form design grids
3.1 would you use to obtain the correct results?
3.2
1.1
2.1
2.2
3.1
3.2
Incorrect.
1.1
2.1
2.2
3.1
3.2
Correct!
1.1
1.1
2.1
2.2
3.1
3.2
Incorrect.
1.1
2.1
2.2
3.1
3.2
Correct!
1.1
1.1
2.1
2.2
3.1
3.2
Incorrect.
1.1
2.1
2.2
3.1
3.2
Correct!
1.1
2.1
Goal 4
2.2
3.1
3.2
Create criteria within date/time
4.1
fields.
Objective 4.1—Given a scenario, choose the correct
criterion for a date/time field.
0
1.1
2.1
• The date/time field stores dates and/or times.
2.2 • Notice the format options show in the picture below:
3.1
3.2
4.1
1.1
2.1
Example 1: Criterion in a date/time field
2.2
You would like to see all students who were born in
3.1 the year 1997 or after.
3.2
4.1
If our design grid is setup with the following fields,
how can we use a criterion to obtain the results we
are looking for?
0
1.1
We would look
2.1 in the date of
Example 1: Criterion in a date/time field
2.2 birth field for our
answer.
3.1
3.2
4.1
3.2
4.1
1.1
2.1
Example 2: Criterion in a date/time field
2.2
You would like to see all students considered non-traditional from our
3.1 student population. You consider non-traditional students to be those
3.2 35 years old and older. For the sake of this example, pretend that
4.1
today’s date is June 1, 2017.
If our design grid is setup with the following fields, how can we use a
criterion to obtain the results we are looking for?
0
1.1
We would look
2.1
Example 2: Criterion in a date/time field in the date of
2.2 birth field for our
answer.
3.1
3.2
4.1
1.1
2.1
Example 2: Criterion in a date/time field
2.2
3.1
• We need to know what year is 35 years prior to our current year (2017
in this example).
3.2
• 1962 is 35 years prior to 2017.
4.1
• This means that someone born on 6/1/1962 would turn 35 years old
on today’s date (remember it’s 6/1/2017 in the example).
• We essentially want to know who is 35 years old or older. Or…who
has a birthday on or before 6/1/1962.
0
1.1
We use the less
2.1 than or equal to
Example 2: Criterion in a date/time field
2.2 operator to find
all dates before
3.1 6/1/1962.
3.2
4.1
1.1
1.1
2.1
2.2
3.1
3.2
4.1
Incorrect.
1.1
2.1
2.2
3.1
3.2
4.1
Correct!
1.1
1.1
2.1
2.2
3.1
3.2
4.1
Incorrect.
1.1
2.1
2.2
3.1
3.2
4.1
Correct!
1.1
2.1
Goal 5
2.2
3.1
3.2
Use a wildcard in criteria in both
4.1
5.1
queries and advanced filters.
Objective 5.1—Given a scenario, use a wildcard within
criteria.
0
1.1
2.1
• Wildcards are special characters that take the place of unknown
2.2
characters within criteria.
3.1
• Wildcards come in handy when you may not be able to spell
3.2
something you are looking for (like someone’s last name) or when
4.1 you need to find data that fits a pattern.
5.1 • We will be using the * wildcard in our examples.
0
1.1
2.1
Example 1: Using a wildcard in a filter
2.2
3.1 You are looking at the table containing Longview students. Which
students have last names beginning with the letter S?
3.2
1.1
2.1
2.2
5.1
1.1
2.1
2.2
3.1
3.2
4.1
5.1
1.1
2.1
Example 2: Using a wildcard in a query
2.2
3.1 You would like to see all students who live in a city beginning with the
letter B and who are graduating in the decade spanning 2020-2029.
3.2
1.1
2.1
You are looking for
those graduating from
2.2 You will have 2020-2029. You will also
criteria under two use a wildcard to make
3.1
fields: City and your search efficient.
3.2 Grad Year.
4.1
5.1
1.1
2.1
2.2
3.1
3.2
4.1
5.1
1.1
2.1
5.1
1.1
2.1
2.2
3.1
3.2
4.1
5.1 Incorrect.
1.1
2.1
2.2
3.1
3.2
4.1
5.1 Correct!
1.1
2.1
1.1
2.1
2.2
3.1
3.2
4.1
Incorrect.
5.1
1.1
2.1
2.2
3.1
3.2
4.1
5.1 Correct!
1.1
2.1
2.2
You have completed this learning module. You are ready to
3.1 take the assessment over criteria in queries and filters.
3.2