Results 1 to 5 of 5
  1. #1
    jlgray0127 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193

    Running Totals

    I know this is has several threads and I can do this successfully using queries, but I have a situation I am trying to create in a form.


    What I am doing is creating a production schedule for our manufacturing facility.
    This is a blank canvas, so looking for some creative ideas!

    I have a temp table for the part which shows what we need to cover the schedules each week. For the factory, we need to try to level load this demand, meaning we have orders like, Week 1, 1200 pieces, week 2, 1000 pieces, week for 2300 pieces, etc.
    We would try to level load this at 1835 pieces per week....

    For each record, defined by the week date, we would want to load 1835 on those 3 lines.
    I would like to do a running total in the form where we are scheduling, which adds 1835 to week 1, and then 3670 would calculate for week 2 and then 5505 for week 3 and so on... we are scheduling way more than 3 weeks at a time and we may have some 0 weeks in there ect, for shared assets to run other products.

    Thoughts on how I could create the running total output? Should this just be a query that recalculates each time we load a week or is it possible to write this formula to an unbound text box in the form?

    I have a unique ID and all that to calculate the running total... just not 100% sure on how to tie all the logic together to do this.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Could possibly accomplish with DSum() expression in textbox.
    Provide data sample. Either build tables in post with the Advanced post editor toolbar or attach a file.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jlgray0127 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193
    Dlookup is where I went, but am struggling to get it to pull correctly.

    =DLookUp("[RunningTotal_Sched]","[Sys_Schedule_RunningTotal]","ID=" & [Forms]![MTP_WorkBook_PeriodSchedule]![MTP Workbook Scheduler].[Form]![ID])

    I also just tried "ID="& me.ID

    Both result in #Name? - I am not sure what I am missing.
    I want the RunningTotal_Sched Field from the query Sys_Schedule_RunningTotal Where the ID = the ID Field on the subform MTP Workbook Scheduler

  4. #4
    jlgray0127 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193
    Got it!

    =DLookUp("[RunningTotal_Sched]","[Sys_Schedule_RunningTotal]","ID= '" & [Forms]![MTP_WorkBook_PeriodSchedule]![MTP Workbook Scheduler].[Form]![ID] & "'")

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Why is ID field a text type?

    Is this calculation located on [MTP Workbook Scheduler]? If so, just use [ID] as the reference, don't need fully qualified reference.

    Strongly advise not to use spaces in object naming. Why did you for this object but not others?

    You say you want a "running sum" but looks like you are just pulling a total sum. Sum() on form doesn't provide what you want?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 09-14-2015, 06:05 PM
  2. Replies: 3
    Last Post: 02-14-2014, 10:51 AM
  3. Unusual Sub Totals & Totals in Groups.
    By Robeen in forum Reports
    Replies: 12
    Last Post: 03-20-2012, 08:55 AM
  4. Replies: 5
    Last Post: 12-06-2011, 11:18 AM
  5. Month totals and Year totals
    By marksnwv in forum Access
    Replies: 1
    Last Post: 08-05-2011, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums