Hello, I'm working on ms access database to track fuel tank inventories for a multi-store operation. Typically on a pen & paper, you would have the following column headings. Which is what I replicated on access. I can't seem to figure out how to code the opening balance to give me the desired result. I did read Allen Brown's tutorial but, it does not apply to this situation as stock take will be done daily for local ordinance compliance. I Tried to supply as much information as possible. Any Help will be greatly appreciated.
**QUERY**
OPENING = Calculated field based on closing from previous day where store_id is equal to the record.
GALLONS SOLD = Sum of (fuel sold * ratio)
DELIVERED = User Inputted
ADJUSTMENTS = User Inputted
BOOK VOLUME = Opening - Gallons Sold + Delivered - Adjustment
CLOSE VOLUME = User Inputted
OVER/SHORT = Close - Book
**TABLE STRUCTURE**
GRADES_TABLE
Reg
Mid
Prm
FUEL_SALES_TABLE
Reg Belongs to Store 1
Mid Belongs to Store 1
Prm Belongs to Store 1
WETSTOCK_INV
87 Tank
91 Tank
TANKS_TABLE
87 Tank Belongs to Store 1
91 Tank Belongs to Store 1
RATIO_TABLE
Reg = 100% 87 Tank
Mid = 50% 87 Tank
Mid = 50% 91 Tank
Prm = 100% 91 Tank
**QUERY**
OPENING = Calculated field based on closing from previous day where store_id is equal to the record.
GALLONS SOLD = Sum of (fuel sold * ratio)
DELIVERED = User Inputted
ADJUSTMENTS = User Inputted
BOOK VOLUME = Opening - Gallons Sold + Delivered - Adjustment
CLOSE VOLUME = User Inputted
OVER/SHORT = Close - Book
**TABLE STRUCTURE**
GRADES_TABLE
Reg
Mid
Prm
FUEL_SALES_TABLE
Reg Belongs to Store 1
Mid Belongs to Store 1
Prm Belongs to Store 1
WETSTOCK_INV
87 Tank
91 Tank
TANKS_TABLE
87 Tank Belongs to Store 1
91 Tank Belongs to Store 1
RATIO_TABLE
Reg = 100% 87 Tank
Mid = 50% 87 Tank
Mid = 50% 91 Tank
Prm = 100% 91 Tank