Solved

Access 2010 Rolling Deduction or Negative Sum?

Posted on 2014-12-16
6
137 Views
Last Modified: 2014-12-31
Working with a form and subform, there are examples of calculating the sum of the records on the subform and displaying the total on the form. Is it possible to have a rolling deduction? For example; 75 units were completed on an order of 100, 50 last week, 25 so far this week, with 25 left for next week.

Form: 75 units completed
                      Date Completed, Build Qty, Qty completed, Qty remaining
   subform:               last week,              50,                      50,             50
                                  this week,              25,                      25,             25
                                 next week,             25,                         0,             25

As the form units completed increases, can the subform qty completed and qty remaining fields update also?
0
Comment
Question by:D4430
6 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 200 total points
Comment Utility
you can do that using a query, upload a db with the table and related forms
0
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 300 total points
Comment Utility
Have you built any query for this subform with, Week, Build Qty, and Qty Completed?

If so, please paste it here. Otherwise, make a query of the table containing the data. We need this first to roll data into weeks and then add Qty remaining column.
0
 

Author Comment

by:D4430
Comment Utility
No, I have not built any query for the subform. The subform is currently connected to a table that has Build Date and Build Qty. The form is in datasheet view and expanding the subform shows its datasheet view.

Form: OrderDate, OrderID, PartID, OrderQty, QtyComplete

   subform: BuildDate, BuildQty
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 33

Expert Comment

by:Mike Eghtebas
Comment Utility
is Date Completed or rather Week Completed derived from BuildDate?

How about Qty completed, is this field also in the subform?
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
> .. an order of 100, 50 last week, 25 so far this week, with 25 left for next week.

What if:

an order of 100, 10 two weeks ago, 40 last week, 25 so far this week, with 25 left for next week.

Or would you prefer ther rows fixed:

    Previous weeks
    This week
    Next weeks

/gustav
0
 

Author Comment

by:D4430
Comment Utility
Here is a link to a support article that I used to create a function that calculates the grouped running sum in a query. I modified the function to ask for the order quantity and then have the function start with the order quantity and subtract the running sum.

http://support.microsoft.com/KB/205183
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now