Stored or Calculated
By Richard Rost 3 years ago
When to Use Stored Instead of a Calculated Value
In this video, we will discuss when you should use a stored or a calculated value in your Microsoft Access tables. I'll show you how to apply a customer discount based on the time the person has been a customer (number of years) but also allow for you to manually edit the discount amount. I'll show you how to display what the discount should be on the customer form and we'll make a button to apply it. We'll also apply it if the current discount rate is empty. We'll use conditional formatting to highlight the calculated value in red if it's different from the stored one.
Bryce from Washington DC (a Platinum Member) asks: I give my customers a percentage discount based on the time they've been a customer. For example, after a year it's 5%. After two years, it's 7%. And so on. I need the ability to manually change it, however. I give some customers a higher discount if they’ve made a lot of purchases. Others get none. It depends on many factors, and one of those factors is that it's completely up to me. LOL. How do I track this in Access?
Members will learn how to make a much more complex function to determine the discount rate based on multiple factors include table lookups. We'll put this public function in a global module. We will then use an Update Query to assign values to any customers who do not have one.
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to register on my YouTube Find User page so I can set up your account here on my web site. If you're not a member, Join Today!
Subscribe to Stored or Calculated
Get notifications when this page is updated