M.
1. You never seem to listen! You're getting in a muddle with skip again when several people over the years have advised you to use scan.
2. Next, Sum takes you to the bottom of the file, and you don't return to where you were before (not storing the recno to GOTO). So you only get the one.
3. Even if it DID sum each set it means you're travelling through the table many times.
4. Assuming tot_t is a field in the table, why not tot it up as you go?
e.g.
Select curbilldata
SCAN
m.divi = curbilldata.divi
m.r = 0
Scan Rest while m.divi = curbilldata.divi
m.r = m.r + tot_t
EndScan
replace tot_tot WITH m.r/2 for m.divi = curbilldata.divi
EndSCAN
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.