You are on page 1of 135

AN INSTRUCTIONAL MODULE FOR CSIS 115 STUDENTS

CREATED BY KIMBERLY STERNE—EDET 722

Click the
arrow to
continue
0

1.1

2.1

2.2 Indicates which objective you are


currently working on.
3.1
Clicking on these buttons will jump you
3.2
back to a previously learned objective.
4.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

• Given a scenario, select the correct type of


Objective 1.1
query needed to perform a given task.

• Given a scenario, choose the correct criterion


Objective 2.1
to be used within a text field.

• Given a scenario, identify an error within the


Objective 2.2
criterion.

Objective 3.1 • Choose the correct operator for a number field.

• Given a scenario, use the correct operator


Objective 3.2
within a criterion.

• Given a scenario, choose the correct criterion


Objective 4.1
for a date/time field.

Objective 5.1 • Given a scenario, use a wildcard within criteria.


0

Before completing this module, you must already know…


• How to create a query in query design view
• How to create advanced filters in a table
0

Remember: Queries and filters answer questions in a database.

You will not learn how to create a new query or filter in this
module as we already learned that during class.

You will focus only on how to determine the criterion needed to


answer a question in a query or filter.
0

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.

Upon completion of this module, you will take an assessment to


measure your knowledge of this new skill.

Plan to spend 15-20 minutes in this module.


0

1.1

Goal 1
Differentiate between Select, Append,
Delete, and Update queries.

Objective 1.1—Given a scenario, select the correct


type of query needed to perform a given task.
0

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

SELECT QUERY EXAMPLE


• You have a table containing current Select Append
Longview students. You would like to
see only students who live in Raytown, Types of
MO as they are eligible for a new Access
scholarship. Queries

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

APPEND QUERY EXAMPLE


• You have a table containing current Select Append
Longview students. You also have a
table with prospective students. Some Types of
of the prospective students have now Access
enrolled and you wish to move them Queries
to the table containing current
students without reentering the data. Delete Update
0

1.1

DELETE QUERY
• A delete query deletes records that
Select Append
satisfy a criterion.
Types of
Access
Queries

Delete Update
0

1.1

DELETE QUERY EXAMPLE


• You have a table containing past Select Append
Longview students who have already
graduated dating back to the year Types of
2000. You would like to remove the Access
students who graduated from 2000 to Queries
2006 as it is unlikely you will need this
information. Delete Update
0

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

UPDATE QUERY EXAMPLE


• You have a table containing current
Longview students. Data in the table
Select Append
indicates that some students are
pursuing an associate degree in
Types of
teaching. Upon analysis of the data, you
Access
realize that this degree has been Queries
incorrectly entered as “Associate in
Teaching.” You wish to change it to say
Delete Update
“Associate in Arts Teaching.”
0

1.1

You are looking at a table containing patient information,


including names, addresses, insurance type, insurance number,
etc. You would like to see those patients who medical insurance
through Blue Cross & Blue Shield. Select the type of query that
would allow you to find these patients quickly.

A. Append C. Select

Click the shape


containing the B. Delete D. Update
correct answer.
0

1.1

Incorrect.

Remember that you are searching for only


patients who have Blue Cross & Blue Shield,
which is a specific group within the data.
0

1.1

Correct!

Choice C is the correct answer.


0

1.1

You are looking at two tables. One table has information on


prospective patients who recently attended a new patient seminar.
The other has information on current patients. You have followed up
with the new patients and many of them would like to begin seeing
one of the doctor’s in the office. You would like to move them from
the prospective patient table to the current patient table. Select the
type of query that would allow you to find these patients quickly.

A. Append C. Select

Click the shape


containing the B. Delete D. Update
correct answer.
0

1.1

Incorrect.

Remember that you are searching for only


patients who have Blue Cross & Blue Shield,
which is a specific group within the data.
0

1.1

Correct!

Choice C is the correct answer.


0

1.1

• In the remainder of this instructional module, we will focus on only


select queries and how to write criterion within them.
• The process of determining a criterion for a select query is the same
as considering how to determine a criterion for append, update,
and delete queries.
0

1.1

This instructional module will use examples centered on data from a


fictional database of Longview students.

The example database contains a table of student information. While


you will not actually use this table in this instructional module, it is
important that you are familiar with how it is set up so you have a
better understanding of the data you are searching in queries and
filters.
0

1.1

• Here is what the table looks like:

• 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

Ask yourself the following 3 questions as you seek to determine


which criterion to use:

1. Which field(s) will I 3. How can I format the


2. What data type is criterion so that Access
look in to find the
used for the data in the understands what I am
answer to my
field identified? looking for?
question?
0

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?

You come up with the following design grid:


0

1.1

2.1
Example 1: Searching for a matching value
Which students live in Grandview?

1. Which field(s) will I


look in to find the
answer to my
question?

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. Which field(s) will I


2. What data type is
look in to find the
used for the data in the
answer to my
field identified? The city field is a
question?
Short Text data type.
The actual name of
the city someone
lives in is typed in the
field.
0

1.1

2.1
Example 1: Searching for a matching value
Which students live in Grandview?

1. Which field(s) will I 3. How can I format the


2. What data type is criterion so that Access
look in to find the
used for the data in the understands what I am
answer to my
field identified? looking for?
question?

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:”.

Notice that Access


automatically adds quotation
marks (“) around the word.
They must be on both sides of
the word you are searching for.
0

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?

You come up with the following design grid:


0

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. Which field(s) will I


2. What data type is
look in to find the
used for the data in the
answer to my The city field is a
field identified?
question? Short Text data
type. The actual
name of the city
someone lives in is
typed in the field.
0

1.1

2.1
Example 2: Searching for a matching value
Which students live in Blue Springs or Lee’s Summit?

1. Which field(s) will I 3. How can I format the


2. What data type is criterion so that Access
look in to find the
used for the data in the understands what I am
answer to my
field identified? looking for?
question?

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?

A. Student # B. Last Name C. First Name

Click the shape


containing the
correct answer.
0

1.1

2.1

Incorrect.

Remember that you are searching for a


specific last name.
0

1.1

2.1

Correct!

Choice B is the correct answer.


0

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

Click the shape


containing the
correct answer.
0

1.1

2.1

Incorrect.

Remember that states are typically


abbreviated to save space in databases.
0

1.1

2.1

Correct!

Choice B is the correct answer.


0

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.

Think about where the criterion has been


placed within the design grid.
0

1.1

2.1

Correct!

Choice B is the correct answer.


0

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.

Think about where the criteria has been


placed within the design grid.
0

1.1

2.1

Correct!

Choice A is the correct answer.


0

1.1

2.1

Goal 2
2.2

Determine text for criteria in short


text and memo fields.
Objective 2.2—Given a scenario, identify the error
within the criterion.
0

1.1

2.1

2.2

Let’s look at some mistakes commonly


made in queries and filters.
0

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:

Do you spot the mistake?


0

1.1

2.1
Example 1: Criterion placed under an incorrect field
2.2

Did you spot the mistake?

Where should the criterion be placed?


Placing it in Student # will yield zero results.
Instead, it should be moved underneath
the City field.
0

1.1

2.1
Example 1: Criterion placed under an incorrect field
2.2

Did you spot the mistake?

Where should the criterion be placed?


Placing it in Student # will yield zero results.
Instead, it should be moved underneath
the City field.
0

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:

Do you spot the mistake?


0

1.1

2.1
Example 2: Criterion has a typo
2.2
Did you spot the mistake?

The criterion is placed in the correct


column under the city field, but look
closely at the spelling of “Harrisonville.”
Notice the typo. This would yield no results.
0

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:

Do you spot the mistake?


0

1.1

2.1
Example 3: Using text not currently in the table
2.2

Did you spot the mistake?

Look closely at the way “Kansas City” is typed.


Using abbreviations only works if the text was typed
in the table in that exact way. Since Kansas City
has not been abbreviated “KS City” in the table,
you cannot use it as the criterion.
0

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.

B. The criterion appear in the wrong order. Blue Springs


should be first and Lee’s Summit should be under it.

C. The criterion are located under the wrong field.


Click the shape
containing the D. The criterion should be on the same row since this is an AND query.
correct answer.
0

1.1

2.1

2.2

Incorrect.

There are not any typos in the criteria.


0

1.1

2.1

2.2

Incorrect.

The order of the criteria does not matter.


0

1.1

2.1

2.2

Incorrect.

This is an OR query.
0

1.1

2.1

2.2

Correct!

Choice C is the correct answer.


0

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.

A. One or both criteria contain a typo.

B. The criteria were placed under the incorrect field.

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.

The criteria are under the correct fields.


0

1.1

2.1

2.2

Incorrect.

The criteria does not need to be on


separate rows. You are looking for those
who live in Belton AND those who have
Humana Insurance.
0

1.1

2.1

2.2

Incorrect.

Criteria needs to have quote (“) characters


around it. These are put in automatically if
you don’t type it that way.
0

1.1

2.1

2.2

Correct!

Choice A is the correct answer.


0

1.1

2.1

2.2
Goal 3
3.1
Use numbers and comparison operators
as criteria in number, currency, and
AutoNumber fields.

Objective 3.1—Choose the correct operator for a


number field.
0

1.1

2.1
Access prefers symbols within criteria.
2.2

3.1

If you want to tell Access to find numbers greater than 100,


you must use symbols, not words.

greater than 100 >100


0

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.).

< Less than <2022


Students graduating in all years less than 2022 (2021, 2020, etc.).

Greater than >=2020


>= or equal to
Students graduating in 2020 or after (2020, 2021, 2022, etc.).
Note that this includes 2020.

Less than or <=2022


<= equal to
Students graduating in 2022 or earlier (2022, 2021, 2020, etc.).
Note that this includes 2022.
0

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.).

< Less than <2022


Students graduating in all years less than 2022 (2021, 2020, etc.).

Greater than >=2020


>= or equal to
Students graduating in 2020 or after (2020, 2021, 2022, etc.).
Note that this includes 2020.

Less than or <=2022


<= equal to
Students graduating in 2022 or earlier (2022, 2021, 2020, etc.).
Note that this includes 2022.
0

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!

Choice B is the correct answer.


0

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. <=

Click the shape


C. > D. >= containing the
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!

Choice D is the correct answer.


0

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

1. Which field(s) will I 3. How can I format the


2. What data type is criterion so that Access
look in to find the
used for the data in the understands what I am
answer to my
field identified? looking for?
question?
0

1.1 Criterion goes


under the field
2.1
Example 1: Searching for a specific number Graduation Year.
2.2

3.1

3.2

Simply type the


specific year you
are looking for,
which in this case
is “2020”.
0

1.1 This example is very


2.1
similar to the method
Example 1: Searching for a specific number used when looking for a
2.2 specific city name that
3.1
we saw earlier.
Here’s our finished query design grid below:
3.2
0

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

1.1 Criterion goes


under the field
2.1
Example 2: Criterion containing operators Graduation Year.
2.2

3.1

3.2

You want to see students graduating


after 2021. In other words, years that Remember to use
are greater than 2021. an operator.
0

1.1

2.1
Example 2: Criterion containing operators
2.2

3.1
Here’s what our design grid should look like:
3.2

Use the > symbol to find years greater


than 2021. In this case, we will see the
years 2022, 2023, 2024, etc.
0

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

What criteria would I need in this case?


0

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.

We are looking for We need an operator


students living in Lee’s that would show all
Summit. We are looking years 2022 or after. All
for students graduating years greater than or
in 2022 or after. equal to 2022.
0

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.

Under the city field, we We used the > (greater


simply typed the city than) and = (equals)
we were looking for. operators for greater
than or equal to.
0

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.

What criteria would I need in this case?


0

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.

We are looking for The criteria is similar to


students living in Lee’s what we used in the
Summit OR those who previous scenario. There
graduate in 2022 or after. is a difference in where
we type the criteria.
0

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.

For an OR query, we use 2


criteria in different rows.
0

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

Click the shape


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

Incorrect.

Don’t be fooled by the word and in the


question.
0

1.1

2.1

2.2

3.1

3.2

Correct!

Choice A is the correct answer.


0

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

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

Incorrect.

Think about the operator that is needed in


this case.
0

1.1

2.1

2.2

3.1

3.2

Correct!

Choice B is the correct answer.


0

1.1

2.1 You would like to see all


2.2
students graduating
between 2020 and 2023.
3.1 Which of the query design
3.2 grids would you use to
obtain the correct results?

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2
Incorrect.

Think about the operators that are needed


in this case. Hint: You need at least two
criteria.
0

1.1

2.1

2.2

3.1

3.2

Correct!

Choice C is the correct answer.


0

1.1

2.1 You would like to see all


2.2
students who live in
Kansas City and any
3.1 students graduating after
3.2 2022. Which of the query
design grids would you
use to obtain the correct
results?

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2
Incorrect.

Think about the operator that is needed in


this case. Hint: You need at least two
criteria on separate lines in the grid.
0

1.1

2.1

2.2

3.1

3.2

Correct!

Choice B is the correct answer.


0

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

• These formats are important considerations as we begin to


determine our criteria for these types of fields.
• For the purpose of this instructional module you can assume dates
are using the Short Date format as that is the one used by our
textbook in all instances.
0

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

Remember that dates


are formatted in this We want to see students
example using the Short born in 1997 or after. In
Date format (ex. other words, those who
03/15/2002). have birthdays greater than
or equal to 1/1/1997.
0

1.1 We use the


greater than or
2.1
Example 1: Criterion in a date/time field equal to operator
2.2 to find all dates
after 1/1/1997.
3.1

3.2

4.1

Notice that The date was


Access adds # typed using the
symbols before short date
and after the format
date. (6/1/1962).
0

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

Remember that dates


are formatted in this
example using the Short
Date format (ex.
03/15/2002).
0

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

Notice that The date was


Access adds # typed in using
symbols before the short date
and after the format
date. (6/1/1962).
0

1.1

2.1 You are using Filter


2.2
by Form to see all
students who were
3.1 born in 1996 or
3.2 before. Which filter
by form design grid
4.1
below would you
choose?

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

4.1
Incorrect.

Think about the operator needed and the


date format required.
0

1.1

2.1

2.2

3.1

3.2

4.1
Correct!

Choice D is the correct answer.


0

1.1

2.1 You are interested


2.2
in finding students
who live in Lee’s
3.1 Summit, who are
3.2 graduating in
2022, and who
4.1
were born in 1990
or earlier. Which
query design grid
below would you
choose?

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

4.1
Incorrect.

Which operator is needed?


Should all criteria be on the same row or
different rows?
0

1.1

2.1

2.2

3.1

3.2

4.1
Correct!

Choice B is the correct answer.


0

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

4.1 You have the filter setup shown below:


5.1

How do you answer this question?


0

1.1

2.1

2.2

3.1 Criteria should


go under Last
3.2 Name.
4.1

5.1

You are only looking for


Field contains last last names beginning
names. You must type with the letter S, so you
something to represent will need a wildcard.
the last name(s) you are
looking for.
0

1.1

2.1

2.2

3.1

3.2

4.1

5.1

To type this criteria, you


type S*. Access adds
the word Like and the
quote characters
around the S*.
0

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

4.1 You have the query design grid shown below:


5.1

How do you answer this question?


0

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

You will need a


wildcard since we
are looking for all
cities beginning
with the letter B.
0

1.1

2.1

2.2

3.1

3.2

4.1

5.1

By typing 202*, Access


By typing B*, Access will will find all years in the
find all cities starting range 2020 to 2029.
with the letter B.
0

1.1

2.1

2.2 You are searching for all students who


3.1
live in cities beginning with the letter H.
Which advanced filter design would
3.2 you use?
4.1

5.1

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

4.1

5.1 Incorrect.

You must use a wildcard.


0

1.1

2.1

2.2

3.1

3.2

4.1

5.1 Correct!

Choice B is the correct answer.


0

1.1

2.1

2.2 You are looking for all


3.1
students with the last name
beginning with P and all
3.2 students living in cities
4.1 beginning with B. Which
query design grid will you
5.1
use?

Click the image


containing the
correct answer.
0

1.1

2.1

2.2

3.1

3.2

4.1
Incorrect.
5.1

You must use a wildcard. Remember that


this is an OR query.
0

1.1

2.1

2.2

3.1

3.2

4.1

5.1 Correct!

Choice A is the correct answer.


0

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

4.1 You have 2 options:


5.1
(1) do the assessment now
(2) go back to a section of this module to practice again.

CLICK HERE to go to the Assessment.

You might also like