Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009

    Unanswered: Running Total Help

    I am trying to write a query that will return the running total of demand by part number.


    Demand Requirements


    Part Number
    Qty on Hand
    Requirement Date
    Requirement Quantity

    The real goal here is to filter on any Parts where the demand drops below the quantity on hand and show any records where we are going to be short of parts.

    Any help would be awesome!

  2. #2
    Join Date
    Oct 2009
    the key to stock management is that you don't record in the table the 'stock on hand'. it is instead a calculated value. You record the 'in' (+) and the 'out' (-); and the current stock level is always then calculated on the fly.

    That's the essential concept.

    As to whether one can order if it causes negative stock; or should prevent them from ordering with a warning or whatever - - is business dependent and there are alot of variations as to how one can implement the human interface.

    Hope this helps.
    www CahabaData com

  3. #3
    Join Date
    May 2009

    Running Total

    Yes, this is a query to be run whenever my Buyer wants to look and see what she will be short of.

  4. #4
    Join Date
    May 2009

    I figured it out

    UPDATE tblLateOrders SET tblLateOrders.DemandRunningTotal = DSum("DemandQty","tblLateOrders","PartNumber = '" & [PartNumber] & "' AND [OrderDate] <= #" & [tblLateOrders]![OrderDate] & "#");

    The hardest part was getting the punctuation right!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts