Once again this is about my inventory system.
Date IN OUT Balance
20
2003/04/01 5 25
2003/04/04 5 20
2003/04/20 10 10
2003/04/29 3 13
So, I got 2 recordset
1. rs_stock_receiving (for IN column)
2. rs_stock_issue (for OUT colum)
The sort is from the beginning of the month until end of the month.
I got the first balance column field right but total up the all the same stock code plus all stock receiving minus stock issue
Balance = (addition of all stock which received before the selected month) - (addition of all stock which issued out before the selected month
Problem is to get the first record which is the earliest and loop the 2 tables until end.

So, in this situation, what is the best to do? Many thanks