Section 92 of Grammar for Grown-ups. 'Effect' is a noun and 'affect' is a verb. Our grammar guru recommends trying to substitute the verb 'transform' for 'affect' in the sentence. If it still makes sense then 'affect' is correct in the original sentence.
There is a later health warning about using 'effect' as a verb, which is a possibility when 'effect' is taken to mean 'to bring into being': 'The new policy will be effected as soon as possible'.