I have a table “IGPM”, with three fields: “DATE”, ““ACCUMULATED” , " INDEX”.
The date is my primary key, the index stores the IGP of the index of the
month, and accumulated it must store to you, automatically collected of the
values of the field of the index (being multiplied). Necessary that it is the
value of the future of the fields, not of pasts, thus, when inserting new
data in INDEX, he must bring updated all the COLLECTED registries,
multiplying this value to his, thus:
Date Index accumulated
01/06 1,15 1,15 - it
does not have reserve, repeats the value
now I add a registry :
Date Index accumulated
01/06 1,15 1,38 IT
CHANGED therefore 1,15*1,20=1,38
02/06 1,2 1,2 it
does not have reserve, repeats the value
to add plus one
Date Index accumulated
01/06 1,15 1,863 IT CHANGED
therefore 1,15*1,20*1,35=1,863
02/06 1,2 1,62 IT
CHANGED therefore 1,20*1,35=1,62
03/06 1,35 1,35
How can I make this function?
Regards,
Marcelo
Brasil
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200610/1