Advanced Calculations

In the previous two chapters, you've learned loads of ways calculations can make your databases work harder for you. But the functions you've learned so far can't make your databases work much smarter. For example, the TextColor function can display the balance due on an invoice in red. But suppose you want that to happen only if the invoice is past due? You could do it in any number of ways, from sorting invoice records to creating a special "past due balance" field. But they all either make extra work for the person using the database, or give you as designer yet another field to worry about every time you tweak, troubleshoot, or repurpose the database. The most elegant solution is to let the database figure out for itself when an invoice is past due. In other words, you want to create a calculation that makes a decision based on current data, whatever it may be. This chapter shows you how to give your calculations that brainpower by using logical functions and other advanced techniques.


Note: Before you read on, now's a good time to download a fresh copy of the working database. This chapter refers to some layouts and fields that your copy may not have. Head over to MissingManuals.com, as discussed on Section 3.4.5.


Категории