We help IT Professionals succeed at work.
Get Started

Sum Beginning Inventory in Group Footer

rodneygray asked
Last Modified: 2012-05-05
I am trying to format a report that will show beginning inventory and determine ending inventory based upon transactions.  This seems to be a simple matter. However, I keep coming up with the wrong answer.
There are four tables (keys denoted by *)
Product:                 *ProductCode / Description
Warehouse:            *WarehouseCode / Description
ProductWarehouse: *ProductCode / *WarehouseCode / Beginning Inventory
Transactions:          *ProductCode / *WarehouseCode / *TransactionID / TransactionDate/ TransactionAmount

Report is formatted in the following manner
ProductCode ProductDescription
       WarehouseCode WarehouseDescription                   Beginning Inventory: 2,500    Ending Inventory 1900 (BeginInv - Sum(TransactionAmt))
        11/15/2006    100                                                                                                                       (This works)
        11/16/2006    200
        11/17/2006    300
        Total             600
The problem occurs here. If I have more than one warehouse within a specific product code, I cannot sum the Beginning Inventory and subtract the sum of the transaction amounts (=sum(BeginInventory) - sum(TransactionAmount).  In the case listed above there are three detail records. Access adds 2500 for each detail record. Thus my equation becomes 7,500 - 600, not 2,500 - 600. It is adding 2,500 for each record. I hope I have made this clear enough for someone to assist.                                                          
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE