Simple Loop

I am having a problem inserting a value via a loop. I have run debugger and see the loop run 3 times (number of records in the found set), but the value is only inserted into the first record. I am sure I must be missing something simple here, If someone could show me the error of my ways, I would be most appriciative.

controller.find()
account_number = globals.Text16;
controller.search();

for(var i=1; i <= forms.AccountTempContact.foundset.getSize();i++)
{
new_account_number = globals.Integer5;
}

Thanks for any help here!

Erich

sorry, fugured it out

var record = foundset.getRecord(i);
record.new_account_number = globals.Integer5;