Constraints on the impact of active galactic nuclei on star formation in galaxies