calculate table on form change