2 Major Parts of A Query Window

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

2 Major Parts of a Query Window 1.

) Design Area or the top portion displays the fields, tables, and queries that you may want to use in the query 2.) Grid or the lower portion contains columns where you can set up the fields. Matching Text when you enter criteria in the cell, your text should be enclosed in quotes to distinguish it from operators and other expression. Criteria Field: City Table: Students Sort: Show: check Criteria = Claremont Field: City Table: Students Sort: Show: check Criteria = Claremont or Alhambra Field: City Table: Students Sort: Show: check Criteria = Not Claremont or: Alhambra To exclude a value in the field, use the Not operator followed by the word enclosed in quotes. This will display all records that match the word inside the quotes. It will display all records whose town entry is Claremont or Paris typing Alhambra in the or: category will also produced the same results. Description This will find all records that match exactly with the text string in the Criteria. Therefore, it will display all records whose Town matches with Claremont.

Using Wildcards A wildcard is a special character that is used to substitute unknown characters in a query. The two commonly used wildcards are the asterisk (*) and the question mark (?).An asterisk represents any string of text while the question mark represents a single character only. Criteria Description This will find all records that start with the letter B in the Title field. Access will add the expression Like and place quotes around your criteria.

Field: Title Table: Books Sort: Show: check Criteria: Like B* Or: Field: Title Table: Books Sort: Show: check Criteria: Like *ing Or: Field: FirstName Table: Students Sort: Show: check Criteria: Like Mar? Or:

This will display all records that end with ing in the field.

This will find all records matched with the specified pattern. This will display Mary but not Maryl.

You can also use > and < in defining criteria in text fields which may also return the same result. Although these are usually used in numbers and dates but can also be used for text.

Field: FirstName Table: Students Sort: Show: check Criteria: < C Or: Field: FirstName Table: Students Sort: Show: check Criteria: > C Or:

This will display all records beginning with any letter before the letter C in the alphabet.

This will display all records beginning with any letter after the letter C in the alphabet.

You might also like