My apologies. Let me start over.
I have the following two tables as source data:
ORDERS
{Orders.order#},{Orders.item#},{Orders.qty_ordered}
1000, RD34, 7
1001, RX99, 1
1002, RD34, 6
1003, RD34, 3
ITEMS
{Items.item#},{Items.orig_qty_on_hand}
RD34,21
RX99,18
The tables are linked...
No. It changes (gets reduced) after each order that contains that item. Only the first order containing the item should use the value from the data table. All lines after that should use this formula I am trying to build.
-Dave
Thanks synapsevampire,
The data for Qty on Hand isn't in the table, so I have to calculate it. And sometimes the previous record won't be for the same item - so I need it to go back until it finds the last record with the same item and returns that line's qty on hand.
-Dave
Sure. Thanks Ibass.
Using column names for this example of:
Order #, Item #, Qty Ordered, Updated Qty On Hand
The result should be...
1000, RD34, 7, 14
1001, RX99, 1, 5
1002, RD34, 6, 8 (14-6=8)
1003, RD34, 3, 5 (8-3=5)
All values come directly from the source data, except the 'Updated Qty...
CR Ver 8.5/WinXP/Pervasive DB
Need help finding a formula I can use to find a previous record that matches a value in the current record.
Example:
Current Record:
order #: 3344
item: CDR34
qty ordered: 1
qty on hand*: previous 'qty on hand' for this item -1
*I need to insert a formula...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.