From the course: Access 2016: 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 2016: Queries

Start my 1-month free trial

Solution: Calculate sales price for a product line

- [Voiceover] For this challenge we are tasked with producing a price list for all our products during a sale. Here's how I'd go about it. We would start, of course, with our Query in Design view. We're taking a look at our product details, so we'll add that table. And we'll just go ahead and add all of these fields down into our query design grid. Let's go into the next empty field, I'll right click and choose Build to launch our expression builder. So the question is asking to find all the products that are both rose or teal, and then we'll apply one price to them. And if the product is any other color we'll apply a second price. I'm gonna show you a couple of ways to do this. The first way is gonna use the IIF function, which we can find in the Program Flows group here and IIF. Now the expression is going to be evaluating the product's color, so let's start there. We'll go into our database. Go into the Tables, go to our Products, and put in the reference to the color field there…

Contents