From the course: Access 2019: Queries

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Calculate sales price for a product line

Solution: Calculate sales price for a product line

From the course: Access 2019: Queries

Start my 1-month free trial

Solution: Calculate sales price for a product line

(techno music) - [Instructor] For this challenge we were tasked with producing a pricing list for all of our products during a sale. Here's how I'd go about the task. First we'll start a New Query in design view. And I'm only interested in the information coming out of the products table. I'll go ahead and add in all of the columns from the products table. Then we'll come over here to the next empty column, I'll right-click and go into the expression builder. For this, I'm going to use the Iif function, which can be found in builtin functions in the program flow group. And then I'll double-click on Iif. And here we'll type in the expression and the true part and the false part. The expression that we want to evaluate is whether the product is teal or rose colored. To find the color, I'll come in here to the database. We'll go into the tables, into the products table, and I'll double-click on the color column. That'll put in a reference to the color field in the products table. And…

Contents