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.

IIf() conditional statement

IIf() conditional statement

From the course: Access 2019: Queries

Start my 1-month free trial

IIf() conditional statement

- [Instructor] In this chapter, we're going to take a look at creating a new function called a conditional statement. Conditional statements are one of my favorite features of Access queries. They allow you to create an automated decision-making process. They're very flexible and very powerful and can automate some complex tasks in a short amount of time. Essentially, a conditional is just 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 Is in the function 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 or false. Usually this will involve the mathematical…

Contents