• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Taming Access Data > Creating Queries That Make Decisions

Creating Queries That Make Decisions

Besides the usual tasks of sorting, filtering, and calculating, queries are also useful for analyzing data. For example, the query from the previous section returned the number of units left in stock. If you see a negative number returned, obviously a product is going to be backordered, so you need to contact the supplier right away. However, some products also have a specified reorder level, which is the minimum number of units that need to be in stock before the product is reordered. So rather than waiting for the stock to get to 0 (or less), you might reorder when it gets down to 25 units or 10 units, for instance.

A logical approach here would be to add the ReorderLevel field to the query and then compare the Units Left In Stock calculation with the reorder level. If the number of units remaining is less than or equal to the reorder level, you need to reorder the product; otherwise, you do nothing.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint