Hi There,
What I am trying to do is loop through a number of records and exit the loop when the quantity is equal or greater than the running total. But the thing is I also want to include the first field that it comes across that satisfies the criteria.
Here is an example:
Quantity A Quantity B Running Total(B)
========== ========== ================
1000 50 50
2000 100 150
3500 550 750
5000 400 1150
6500
7000
In the example above I want to only display the records in B when the running total meets or exceeds quantity A
What I am trying to do is loop through a number of records and exit the loop when the quantity is equal or greater than the running total. But the thing is I also want to include the first field that it comes across that satisfies the criteria.
Here is an example:
Quantity A Quantity B Running Total(B)
========== ========== ================
1000 50 50
2000 100 150
3500 550 750
5000 400 1150
6500
7000
In the example above I want to only display the records in B when the running total meets or exceeds quantity A