Alternate Criteria in Access 2016
Queries are very powerful in the database thanks to fast and accurate data analysis capabilities. In addition to the uses of the TipsMake.com query introduced in the previous lessons, you can also view data and records that meet two or more conditions using the alternative criteria .
You can add alternate criteria in two ways:
- Use the OR operator to combine two sets of criteria.
- Use query design grid, but instead of specifying criteria on the same line, you'll separate it into multiple rows.
Specifically invite readers to follow the content below.
Let's look at a simple example using alternative criteria in a query. First, open your Access database, then go to the Create tab and click Query Design.
In Show Table, select the table you want to query, here is tblNhanvien, double click and select Close.
In the table window, double click on the name of the field you want to appear in the query. They will be added to the design grid at the bottom of the screen. Here we choose NhanvienID, Ten, Ho, ChucDanh, Dienthoai .
Now specify replacement criteria in different rows of Ho school . When running this query, you will show employees whose last name is Bui or Vu.
Execute the query by clicking the Run command on the Design tab , you will see results like this:
If you want to apply replacement criteria in multiple fields, you add conditions to different rows for the corresponding field. Now, try adding another alternative criterion, in addition to employees with family name is Vu or Bui, we add the condition to have a job title is Translated .
Results returned:
Previous article: Parameter Query in Access 2016
Next lesson: Alternate Criteria in Access 2016
You should read it
- Set up Query Criteria in Access 2016
- What do you know about data queries?
- Options to create data queries in Access 2016
- MS Access 2003 - Lesson 23: Own query design
- Create data queries in Access 2016 from simple to complex
- MS Access 2003 - Lesson 22: Using Query Wizards
- Action Query in Action 2016
- The multiple-choice question set has an answer to Query P1
- MS Access 2003 - Lesson 21: Chapter 6: Using Query to check data
- Multiple choice questions have a Query option
- MS Access - Lesson 10: Querying the database
- MS Access 2010 - Lesson 2: Introduction to objects in Access
Maybe you are interested
How to implement infinite scrolling and pagination with Next.js and TanStack Query
What is the unauthorized GraphQL query error that causes Facebook Messenger to not work?
The cost per search query with Google and Microsoft chatbots can cost 10 times more than a regular search query
How to access TPM Diagnostics tool to query security data on Windows 11
What is SQL Query Optimization... and Why Does It Matter?
ENCODEURL function - The function returns a query string with URL code in Excel