problem within 2 tables

i have table two tables projforecastempl and psaactivitysetup and are related with activitynumber field

i want projforecastempl value to be stored in psaactivitysetup and whenever i update it on projforecastempl

i.e one field is qty in projforecastempl and i need if activity number match in both the table than sum of qty field will be stored in effort field of psaactvitysetup table