>>>The last record should be last the last record in the break group not the last record of the scan.
>>>
>>Yep
>
>My point is that I think you'd have to compare the new record to see if it the same as the old record and if not, then you have to go back to the previous record and handle the "last" record. You don't know it's the last till you read the next.
huuummm.. but, you can deal with variables.. the idea to skiping down and up on every time sounds ilogical and can represent a ethernal loop if someone insert a record on the middle of the procedure..
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20