Hello...i need some help here please.

I have a data block named DTVD wich is a set of records with 4 fields
In his data block from my form i just put 5 visible records for the user to make his imputs... meanwhile .. if he wanted to filled more records than five he needs to scrolldown for appearing the new records.

The problem is like this:

I'm in a upper data block named VDDI. There is a text item there (CDTPSER) who have extremly importance for the results of the field NRORDEM from the last block record sets (DTVD). I have a trigger there (WHEN-VALIDATE-ITEM) in the DTVD.CDTPSER item with the fowlling code:

if(DTVD.CDTPSER = 5) then

while (:SYSTEM.last_record <> 'TRUE') loop
end loop;

/* The fowlling lines is for cleaning the field DTVD.NRORDEM
from the last record */


end if;

I found one minor problem ... is that the code doesn't go to the block DTVD and doesn't clear the DTVD.NRORDEM item's from the set of records... and i still don't know why.

Another and bigger problem, is that i've used this code early after a execute_query to fetch the records from the database and to make my data updates. And the biggest surprise is that he makes all changes correctly ...but just for the records visible from the form. I've just have 5 visible records ....but in the database there are 8 records ...so 3 records that are not visible. This 3 records won't be changed with the
latest code. I thing is something about this 3 records are some how in a buffered state... and i can´t reach them and change them with that code.

So....if anybody can help me with this , i would apreciate.