Throwback Thursday: January 23, 2025

We dive into the difference between IIf() and IIf()--that's not a typo--in today's edition of Throwback Thursday.

Throwback Thursday: January 23, 2025

With over a million words scattered across more than 1,300 articles on this blog, you've probably missed a few things here.

That’s why each week in "Throwback Thursday," we’ll revisit some standout posts. Expect a blend of my personal favorites, insightful articles from other great minds, and a touch of coding humor to keep things light.


Highlights from NoLongerSet.com

Expressions vs. Code
When is code not code? When it’s an expression. What’s the difference and who really cares? Let’s explore.
Expressions vs. Code: Implicit Type Conversion
In Microsoft Access, is a whole number literal implicitly treated as a Long or an Integer or a Double? As it turns out, it depends on where you ask.
The IIf() Function vs. The IIf() Statement
They may look identical, but there is a very important difference in how they get evaluated.
The Microsoft Access Ternary Operator
It’s a function. It’s a statement. It’s an operator. It’s a--what the heck do we call this short-circuit-evaluating IIf() thing and why does it even matter?

Wisdom from Around the Web

Microsoft Access tips: Optimizing queries
How to get JET (the database engine in Microsoft Access) to execute queries quickly

I first learned about the difference in behavior between Jet's IIf() and VBA's IIf() from the venerable Allen Browne in his article above. Here's the key excerpt:

(Note: JET's IIf() is much more efficient than the similarly named function in VBA. The VBA one wastes time calculating both the True and False parts, and generates errors if either part does not work out (even if that part is not needed.) The JET IIf() does not have these problems.)

Developer Humor

DIY

Cover image generated by Ideogram

All original code samples by Mike Wolfe are licensed under CC BY 4.0