Use MS Access 365 for Inventory Management |
Part 7: Implementing Inventory Control Logic and Business Rules |
1. Introduction to Inventory Control Logic |
1.1 What is Inventory Control Logic |
Inventory control logic refers to the set of rules and calculations that govern how inventory is managed within a system. These rules define: |
1. How stock levels are updated |
2. When to reorder products |
3. How transactions are validated |
4. How discrepancies are handled |
1.2 Importance in MS Access Systems |
Implementing proper control logic ensures: |
1. Accurate stock tracking |
2. Prevention of negative inventory |
3. Consistent business operations |
4. Reliable reporting |
Without well-defined logic, even a well-designed database can produce incorrect results. |

|
2. Core Inventory Concepts |
2.1 Stock Quantity Calculation |
Stock quantity is not simply stored—it is derived from transactions: |
1. Stock In (purchases, returns) |
2. Stock Out (sales, usage) |
2.2 Real-Time vs Calculated Stock |
Two approaches: |
1. Stored Stock Field |
* Faster |
* Risk of inconsistency |
2. Calculated Stock via Queries |
* Always accurate |
* Slightly slower |
Best practice: use calculated stock for accuracy. |
2.3 Inventory Lifecycle |
1. Procurement |
2. Storage |
3. Distribution |
4. Adjustment |
Each stage must be reflected in system logic. |

|
3. Implementing Stock Movement Logic |
3.1 Stock In Logic |
Occurs when: |
1. Receiving purchase orders |
2. Customer returns |
3. Manual adjustments |
3.2 Stock Out Logic |
Occurs when: |
1. Sales transactions |
2. Internal usage |
3. Damaged goods removal |
3.3 Transaction-Based Model |
Every stock change must: |
1. Create a transaction record |
2. Specify quantity and type |
3. Link to a product |

|
4. Preventing Negative Inventory |
4.1 Problem Overview |
Negative inventory occurs when stock is reduced below zero. |
4.2 Validation Rules |
Before processing a stock-out transaction: |
1. Check current stock |
2. Compare with requested quantity |
4.3 Implementation Using VBA |
Logic: |
1. Retrieve current stock |
2. If stock < requested quantity |
3. Display error and cancel transaction |
4.4 Benefits |
1. Prevents data inconsistencies |
2. Avoids operational errors |

|
5. Reorder Level Management |
5.1 What is Reorder Level |
The minimum stock level at which a product should be reordered. |
5.2 Setting Reorder Levels |
Based on: |
1. Demand rate |
2. Lead time |
3. Safety stock |
5.3 Reorder Alert Logic |
System should: |
1. Compare stock with reorder level |
2. Trigger alerts when threshold is reached |
5.4 Implementation in Queries |
Create a query: |
StockQuantity < ReorderLevel |

|
6. Safety Stock and Buffer Management |
6.1 Definition |
Safety stock is extra inventory held to prevent stockouts. |
6.2 Calculation Factors |
1. Demand variability |
2. Supplier reliability |
3. Lead time fluctuations |
6.3 System Implementation |
Add fields: |
1. SafetyStock |
2. MinimumStock |

|
7. Batch and Lot Control |
7.1 Purpose |
Track inventory by batch or lot number. |
7.2 Benefits |
1. Traceability |
2. Quality control |
3. Expiration tracking |
7.3 Database Design |
Add fields: |
1. BatchNumber |
2. ManufactureDate |
3. ExpiryDate |
7.4 Business Logic |
1. Record batch during stock entry |
2. Track usage by batch |
3. Prevent use of expired items |

|
8. FIFO and LIFO Inventory Methods |
8.1 FIFO (First In, First Out) |
Oldest stock is used first. |
8.2 LIFO (Last In, First Out) |
Newest stock is used first. |
8.3 Implementation in MS Access |
Use queries and VBA to: |
1. Sort transactions by date |
2. Allocate stock accordingly |
8.4 Use Cases |
1. FIFO Perishable goods |
2. LIFO Non-perishable items |

|
9. Handling Returns |
9.1 Customer Returns |
Process: |
1. Record return transaction |
2. Increase stock |
9.2 Supplier Returns |
Process: |
1. Record outgoing transaction |
2. Decrease stock |
9.3 Validation |
Ensure: |
1. Returned quantity is valid |
2. Linked to original transaction |

|
10. Stock Adjustment Logic |
10.1 Reasons for Adjustments |
1. Physical count discrepancies |
2. Damaged goods |
3. Data correction |
10.2 Adjustment Process |
1. Record adjustment transaction |
2. Specify reason |
3. Update stock |
10.3 Audit Trail |
Maintain: |
1. Date |
2. User |
3. Reason |

|
11. Multi-Location Inventory Management |
11.1 Concept |
Track inventory across multiple locations. |
11.2 Database Enhancements |
Add: |
1. Location table |
2. LocationID in transactions |
11.3 Business Logic |
1. Track stock per location |
2. Enable transfers between locations |
11.4 Transfer Transactions |
1. Stock OUT from source |
2. Stock IN to destination |

|
12. Unit of Measure Management |
12.1 Importance |
Products may use different units: |
1. Pieces |
2. Boxes |
3. Kilograms |
12.2 Conversion Logic |
1. Define base unit |
2. Convert during transactions |
12.3 Implementation |
Add fields: |
1. UnitType |
2. ConversionFactor |

|
13. Pricing and Cost Control |
13.1 Cost Tracking |
Track: |
1. Purchase cost |
2. Selling price |
13.2 Profit Calculation |
Profit = Selling Price Cost Price |
13.3 Dynamic Pricing Logic |
Update prices based on: |
1. Supplier changes |
2. Market conditions |

|
14. Inventory Valuation Methods |
14.1 Common Methods |
1. FIFO |
2. LIFO |
3. Weighted Average |
14.2 Weighted Average Calculation |
Average cost is recalculated after each purchase. |
14.3 Implementation |
Use queries or VBA to: |
1. Calculate average cost |
2. Apply to stock valuation |

|
15. Business Rule Enforcement |
15.1 Types of Rules |
1. Data validation rules |
2. Transaction rules |
3. Access control rules |
15.2 Implementation Points |
1. Tables (constraints) |
2. Forms (validation) |
3. VBA (logic enforcement) |

|
16. Audit and Logging Mechanisms |
16.1 Importance |
Track all changes for accountability. |
16.2 What to Log |
1. User actions |
2. Data changes |
3. Timestamps |
16.3 Implementation |
Create log table: |
1. LogID |
2. Action |
3. User |
4. DateTime |

|
17. Exception Handling |
17.1 Common Exceptions |
1. Stock mismatch |
2. Invalid transactions |
3. Data conflicts |
17.2 Handling Strategy |
1. Detect error |
2. Notify user |
3. Prevent incorrect operation |

|
18. Testing Business Logic |
18.1 Scenario Testing |
Test: |
1. Stock IN/OUT |
2. Returns |
3. Adjustments |
18.2 Edge Cases |
1. Zero stock |
2. Large quantities |
3. Simultaneous transactions |

|
19. Summary of Part 7 |
In this section, we covered: |
1. Core inventory control logic |
2. Stock movement and validation |
3. Reorder and safety stock management |
4. Batch tracking and valuation methods |
5. Multi-location and unit management |
6. Business rules and audit mechanisms |