For example, if one formula might result in a division by zero, you can’t ignore it because you think it won’t be used and that the other part will apply. If that’s the case, the formula won’t work even if the other expression would be the one applied. It’s important to consider the possibility that one of the expressions might result in an error. Each part can be an expression.Įven though IIf returns only one value, both the true and false value expressions are evaluated. Three parameters, or parts, must be specified-the condition to test, the value if true, and the value if false-using the syntax IIf(condition to test, value if true, value if false). To see if DaysOverdue is between 1 and 30, we’ll use the IIf (Immediate If) function, which can be used anywhere you can use an expression and works much like the IF function in Excel. Date() returns the current date and is like the TODAY function in Excel. DateDiff finds the difference between two dates and returns the result in the specified time interval, such as days, months, or years. The formula for DaysOverdue is: DateDiff(“d”,, Date()). DaysOverdue is a calculated field and can be used in expressions for other calculated fields. Consider a query that has columns for DateDue, AmountDue, and DaysOverdue.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |