Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

MS Access replacement criteria


May 16, 2021 MS Access


Table of contents


Queries have many advantages. You can save and run the same query over and over again, and many times you want to add a replacement condition.

You can add a replacement condition in two ways:

  • You can use the OR operator to combine two sets of conditions.
  • You can also use queries to design a grid, but you don't need to specify a condition on the same row, you need to separate it in multiple rows.

Example

Let's look at an example of a simple replacement condition. Open the database and select Query Design in the Create tab.

MS Access replacement criteria

Double-click tblEmployee and close the Display Table dialog box.

MS Access replacement criteria

Double-click all the fields you want to see as the result of the query.

MS Access replacement criteria

You can now see that the replacement condition is specified in different rows of the LastName field. W hen you run this query, you'll see employees with the last name Pollard or Manning. Let's run this query now.

MS Access replacement criteria

As you can see, only two employees were retrieved because of the replacement condition.

If you want to add a replacement condition to more than one field, you must use different rows for all fields. nt.

Let's run this query now.

MS Access replacement criteria

You will now see the following results.

MS Access replacement criteria