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.

IIf() conditional statement

IIf() conditional statement

From the course: Access 2016: Queries

Start my 1-month free trial

IIf() conditional statement

- [Voiceover] In this chapter, we're gonna take a look at creating a new function called a conditional statement. Conditional statements are one of my favorite features of access queries. The allow you to create an automated decision-making process. They're very flexible and powerful and you can automate some complex tasks in a short amount of time. Essentially a conditional is an if, then statement. In Access, we'll use the function called IIF. The IIF function has a specific syntax that must be followed. It has three required arguments. The expression to evaluate, the piece to return if true and the piece to return if false. And if you're wondering, no that isn't a typo, there are two I's in this function's name. The first I stands for inline so sometimes you might hear this referred to as the Inline IF function. The first argument of IIF is the expression. Here we can use any mathematical expression that evaluates to true of false. Usually this will involve the mathematical…

Contents